aboutsummaryrefslogtreecommitdiffstats
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorFrancesco Cosoleto <cosoleto@gmail.com>2010-02-26 14:46:20 +0000
committerBenoit Fouet <benoit.fouet@free.fr>2010-02-26 14:46:20 +0000
commit6abda15f5633b610727c2755ae35ce1599ece115 (patch)
tree782cee9863584b4f8351d641684d20e5a103f77e /ffmpeg.c
parentbe707647e9d4a8e4fd6691241e820391372c965e (diff)
downloadffmpeg-6abda15f5633b610727c2755ae35ce1599ece115.tar.gz
Prevent overflow of start_time + recording_time.
Patch by Francesco Cosoleto gmail($name) Originally committed as revision 22077 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index db3d053e5f..fe250f8b06 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2305,7 +2305,8 @@ static int av_encode(AVFormatContext **output_files,
}
/* 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;
}