From patchwork Sun Apr 29 23:09:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 8698 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:155:0:0:0:0:0 with SMTP id c82-v6csp2939866jad; Sun, 29 Apr 2018 16:10:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZobFx7tQiJWtYqJksYW9lq/jYnXsI+S2ctuhy6Bq2uF/Oi1vAE1bue/xzhTos+mmQfd+86l X-Received: by 2002:adf:b2f5:: with SMTP id g108-v6mr7757080wrd.147.1525043417232; Sun, 29 Apr 2018 16:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525043417; cv=none; d=google.com; s=arc-20160816; b=H98+wXn4iV5riGv6TJAL9w6M9QRqgZps1McHTBZgtKnOXr/27sswSn1tJ+9uOO3bEW 3bfHvrMHp8hdH0hHLK02UNtGVN1G7yZqUh5yYLOTy475riQZ9V9oum1T/yO9YOzyTM13 WSXYoW2SGHWfyuxXBwvGc7mjTIOk9kXosjdm2mHy9s2eJ5onBH9nfZnuB84wwioipal5 0W2gErBkAafW1iKMr9hp6VZHsHf2UhRcPhTdoaW/ZPfBRpDwvbCJo7gKBou1SrwDr8Nw f/lzomaEhziz3QempImi2rBKJQc+R16p1YuCIFu0p+v/o1CV1O8rI8ng/Z5RAxfLd48c O0iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=283ukdGIR9GTsiyiNemy1aNKciCDF5Yida3txDfen64=; b=SL3ztA9qG3IwmikGtq4yrZDVBKfmUrxXUJZCX/4PiS4JyvXTFV8M5bSjC5HZSgFEYN KlQVZQccQbwFIL4eg1FHHlpaUTfy3WnXnIs8FVCANfYm7g9ECYC1Es21j+dnGh/n5zMB ZyMfZWX32JG+RzFrdRN6atV1F3PHcNsjwQDPfaLxqc1sxFA0OL4WvOBO6s8yord6K2lC bkHsT2apvzBefJSa+Y0OWvhmpNFoiGmi6TSL6PI8GsgXxBy3FImpltyO8hVkq0NfsTls kEj5TUY13PQw4DBCSpVBamwKqkcFoxL97XhRUPFm59XkQjdjompuF2DyhPjAeKLNTiPs lfRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Z8V+CpwM; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 6si4498124wmc.52.2018.04.29.16.10.15; Sun, 29 Apr 2018 16:10:17 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Z8V+CpwM; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 09D9568A4A2; Mon, 30 Apr 2018 02:09:42 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f193.google.com (mail-qt0-f193.google.com [209.85.216.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 30F9568A1DB for ; Mon, 30 Apr 2018 02:09:35 +0300 (EEST) Received: by mail-qt0-f193.google.com with SMTP id h2-v6so9015656qtp.7 for ; Sun, 29 Apr 2018 16:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=4SmxqdJO+um07NE8zDGqU/fOCIhkYNPPcnnOETJd57Q=; b=Z8V+CpwMmDxae5J0tMQP4YxPYETsSVJ847OTFXUJjK9QfLC7m1XOffSB+4oZILKUO7 /xZZfqduJhUFB8DB2xHx8ALD0gYRv2sqVlZflx/t9HuKaYxz4LrWFcXC4rD3w5cXxSBZ 8UEX51ZAIlk+gGWbsGNAxPF9T283CiyoHJJgEmvzScqE8vmK0n7d1vurTlbTW9dTRXpa 81cqP3go8hg2qMXm5Qq9rrShl85hRci/X/21YV5LcJsT8I5Mo1wdbg1q7o+svOxXm8lQ tIBd5fDwSeKvnBiGOoJz2ZeGk+xN8IYSOJvm8F4vl/Qm6HdPwJBbQlHBIbVvTWuHE8bv ek0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=4SmxqdJO+um07NE8zDGqU/fOCIhkYNPPcnnOETJd57Q=; b=QxYRC8r1EDtzkdMHVyEZ9Cb6CZzfTTNbSzTb0VkumJPXaRswTB+KYmAR9ytbCiGV+S a6YESSRJEd0yh95jEcU1HMLKDw/3kO9L/2zme5yPyxdZIUP9sB17w11xveLOLzNgBj5Y uHlygWrEtj7+gcuoVeBRpPgEmGU53Sa8VIuZNdlWAwu+0itTmldNBvmPZTk4FWy6PuIS eamy6yX8jW0jBn/eCX2SD3LI3iVllo4fUVbomDFr4mUiOE17Js+b3ro8apc23TN+BlWQ QoS5bqsa/8demgjw4Mph9yNtR28GpjwB5usyiI4jcaZ+GAcqt0IV/fUUmIZ1UH10ORBv jZ3g== X-Gm-Message-State: ALQs6tAh3UHvhRJs3VeKoqHjKlyGAu/LUMdUb0JmVmsAWk3ZhFjTg/iK SPO4NlXVYtMXEKj275+jVpv/vg== X-Received: by 2002:ac8:827:: with SMTP id u36-v6mr10093184qth.78.1525043405706; Sun, 29 Apr 2018 16:10:05 -0700 (PDT) Received: from localhost.localdomain ([190.188.171.140]) by smtp.gmail.com with ESMTPSA id d3sm4833390qkf.22.2018.04.29.16.10.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Apr 2018 16:10:05 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 29 Apr 2018 20:09:40 -0300 Message-Id: <20180429230940.3604-1-jamrial@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: References: Subject: [FFmpeg-devel] [PATCH] fftools/ffmpeg: fix mixed code and declarations X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: James Almer --- fftools/ffmpeg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index d3054092ba..4be6e46d9b 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -4727,8 +4727,7 @@ static int transcode(void) static BenchmarkTimeStamps get_benchmark_time_stamps(void) { - BenchmarkTimeStamps time_stamps; - time_stamps.real_usec = av_gettime_relative(); + BenchmarkTimeStamps time_stamps = { av_gettime_relative() }; #if HAVE_GETRUSAGE struct rusage rusage; @@ -4833,10 +4832,11 @@ int main(int argc, char **argv) if (transcode() < 0) exit_program(1); if (do_benchmark) { + int64_t utime, stime, rtime; current_time = get_benchmark_time_stamps(); - int64_t utime = current_time.user_usec - ti.user_usec; - int64_t stime = current_time.sys_usec - ti.sys_usec; - int64_t rtime = current_time.real_usec - ti.real_usec; + utime = current_time.user_usec - ti.user_usec; + stime = current_time.sys_usec - ti.sys_usec; + rtime = current_time.real_usec - ti.real_usec; av_log(NULL, AV_LOG_INFO, "bench: utime=%0.3fs stime=%0.3fs rtime=%0.3fs\n", utime / 1000000.0, stime / 1000000.0, rtime / 1000000.0);