[FFmpeg-cvslog] fftools/ffmpeg: fix mixed code and declarations

James Almer git at videolan.org
Tue May 1 00:27:53 EEST 2018


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Mon Apr 30 13:19:29 2018 -0300| [e3866ea20d55a17119cfcdeb630c70f0f93e1020] | committer: James Almer

fftools/ffmpeg: fix mixed code and declarations

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e3866ea20d55a17119cfcdeb630c70f0f93e1020
---

 fftools/ffmpeg.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index d3054092ba..5dc198f933 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);



More information about the ffmpeg-cvslog mailing list