]> git.sesse.net Git - ffmpeg/commitdiff
Use av_compare_ts to compare against the -t end time instead of using
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 10 Feb 2010 19:46:44 +0000 (19:46 +0000)
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>
Wed, 10 Feb 2010 19:46:44 +0000 (19:46 +0000)
floating point.
Should fix different results between PPC and x86 for the idroq-video-encode
FATE test.

Originally committed as revision 21745 to svn://svn.ffmpeg.org/ffmpeg/trunk

ffmpeg.c

index fe275ac8b82780ecfa84a0f775530d0235263fdf..764453070e7395702779250bec091a8217980bef 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2319,7 +2319,7 @@ static int av_encode(AVFormatContext **output_files,
         }
 
         /* finish if recording time exhausted */
-        if (pkt.pts * av_q2d(ist->st->time_base) >= (recording_time / 1000000.0)) {
+        if (av_compare_ts(pkt.pts, ist->st->time_base, recording_time, (AVRational){1, 1000000}) >= 0) {
             ist->is_past_recording_time = 1;
             goto discard_packet;
         }