[xiph-commits] r14136 - trunk/ffmpeg2theora
j at svn.xiph.org
j at svn.xiph.org
Tue Nov 13 07:42:34 PST 2007
Author: j
Date: 2007-11-13 07:42:33 -0800 (Tue, 13 Nov 2007)
New Revision: 14136
Modified:
trunk/ffmpeg2theora/theorautils.c
Log:
print time elapsed instead of 0 remaining
Modified: trunk/ffmpeg2theora/theorautils.c
===================================================================
--- trunk/ffmpeg2theora/theorautils.c 2007-11-13 13:18:54 UTC (rev 14135)
+++ trunk/ffmpeg2theora/theorautils.c 2007-11-13 15:42:33 UTC (rev 14136)
@@ -413,11 +413,24 @@
}
else {
- fprintf (stderr,"\r %d:%02d:%02d.%02d audio: %dkbps video: %dkbps, time remaining: %02d:%02d:%02d ",
+ if(!remaining) {
+ remaining = time(NULL) - info->start_time;
+ 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 ",
hours, minutes, seconds, hundredths,
info->akbps, info->vkbps,
remaining_hours, remaining_minutes, remaining_seconds
);
+ }
+ else {
+ fprintf (stderr,"\r %d:%02d:%02d.%02d audio: %dkbps video: %dkbps, time remaining: %02d:%02d:%02d ",
+ hours, minutes, seconds, hundredths,
+ info->akbps, info->vkbps,
+ remaining_hours, remaining_minutes, remaining_seconds
+ );
+ }
}
}
More information about the commits
mailing list