[xiph-commits] r16488 - trunk/ffmpeg2theora/src

j at svn.xiph.org j at svn.xiph.org
Wed Aug 19 15:06:20 PDT 2009


Author: j
Date: 2009-08-19 15:06:20 -0700 (Wed, 19 Aug 2009)
New Revision: 16488

Modified:
   trunk/ffmpeg2theora/src/theorautils.c
Log:
print time elapsed at the end

Modified: trunk/ffmpeg2theora/src/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/src/theorautils.c	2009-08-19 09:00:51 UTC (rev 16487)
+++ trunk/ffmpeg2theora/src/theorautils.c	2009-08-19 22:06:20 UTC (rev 16488)
@@ -734,7 +734,7 @@
         }
 
     } 
-    else if (timebase - last > 0.5 || timebase < last) {
+    else if (timebase - last > 0.5 || timebase < last || !remaining) {
         last = timebase;
         if (info->frontend) {
             fprintf(info->frontend, "{\"duration\": %lf, \"position\": %.02lf, \"audio_kbps\":  %d, \"video_kbps\": %d, \"remaining\": %.02lf}\n",
@@ -751,7 +751,7 @@
                 remaining_seconds = (long) remaining % 60;
                 remaining_minutes = ((long) remaining / 60) % 60;
                 remaining_hours = (long) remaining / 3600;
-                fprintf (stderr,"\r      %d:%02d:%02d.%02d audio: %dkbps video: %dkbps, time elapsed: %02d:%02d:%02d ",
+                fprintf (stderr,"\r  %d:%02d:%02d.%02d audio: %dkbps video: %dkbps, time elapsed: %02d:%02d:%02d               ",
                     hours, minutes, seconds, hundredths,
                     info->akbps, info->vkbps,
                     remaining_hours, remaining_minutes, remaining_seconds
@@ -1012,6 +1012,8 @@
 void oggmux_close (oggmux_info *info) {
     int n;
 
+    print_stats(info, info->duration);
+
     ogg_stream_clear (&info->vo);
     vorbis_block_clear (&info->vb);
     vorbis_dsp_clear (&info->vd);



More information about the commits mailing list