aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMika Raento <mika.raento@elisa.fi>2014-09-01 20:10:03 +0300
committerMichael Niedermayer <michaelni@gmx.at>2014-09-02 11:38:36 +0200
commit58e0402e02ae5e466c33b9465c1465fdee68d342 (patch)
treeb4ce70493e18386e583e4e845a75f7be3f659217
parent35469835bb2960f85b6c4acf19632333307937e7 (diff)
downloadffmpeg-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.c2
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) {