Commit 58e0402e authored by Mika Raento's avatar Mika Raento Committed by Michael Niedermayer

segment: don't access outside seg->frames array

Fixes wrong number of segments output and undefined memory access.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 35469835
......@@ -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) {
......
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