Commit 8c1a10fe authored by benoit's avatar benoit

Prevent overflow of start_time + recording_time.

Patch by Francesco Cosoleto gmail($name)


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22077 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fa2c0e62
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment