diff options
author | Mika Raento <mika.raento@elisa.fi> | 2014-09-01 20:10:03 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-09-02 11:38:36 +0200 |
commit | 58e0402e02ae5e466c33b9465c1465fdee68d342 (patch) | |
tree | b4ce70493e18386e583e4e845a75f7be3f659217 | |
parent | 35469835bb2960f85b6c4acf19632333307937e7 (diff) | |
download | ffmpeg-58e0402e02ae5e466c33b9465c1465fdee68d342.tar.gz |
segment: don't access outside seg->frames array
Fixes wrong number of segments output and undefined memory access.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c index ce784da225..1cb64543aa 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -684,7 +684,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) end_pts = seg->segment_count < seg->nb_times ? seg->times[seg->segment_count] : INT64_MAX; } else if (seg->frames) { - start_frame = seg->segment_count <= seg->nb_frames ? + start_frame = seg->segment_count < seg->nb_frames ? seg->frames[seg->segment_count] : INT_MAX; } else { if (seg->use_clocktime) { |