[FFmpeg-cvslog] r22077 - trunk/ffmpeg.c

benoit subversion
Fri Feb 26 15:46:20 CET 2010


Author: benoit
Date: Fri Feb 26 15:46:20 2010
New Revision: 22077

Log:
Prevent overflow of start_time + recording_time.
Patch by Francesco Cosoleto gmail($name)

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c	Fri Feb 26 15:32:27 2010	(r22076)
+++ trunk/ffmpeg.c	Fri Feb 26 15:46:20 2010	(r22077)
@@ -2305,7 +2305,8 @@ static int av_encode(AVFormatContext **o
         }
 
         /* finish if recording time exhausted */
-        if (av_compare_ts(pkt.pts, ist->st->time_base, recording_time + start_time, (AVRational){1, 1000000}) >= 0) {
+        if (recording_time != INT64_MAX &&
+            av_compare_ts(pkt.pts, ist->st->time_base, recording_time + start_time, (AVRational){1, 1000000}) >= 0) {
             ist->is_past_recording_time = 1;
             goto discard_packet;
         }



More information about the ffmpeg-cvslog mailing list