mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
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>
(cherry picked from commit 58e0402e02)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
08f56b846c
commit
8df77c3758
@@ -684,7 +684,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
end_pts = seg->segment_count < seg->nb_times ?
|
end_pts = seg->segment_count < seg->nb_times ?
|
||||||
seg->times[seg->segment_count] : INT64_MAX;
|
seg->times[seg->segment_count] : INT64_MAX;
|
||||||
} else if (seg->frames) {
|
} 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;
|
seg->frames[seg->segment_count] : INT_MAX;
|
||||||
} else {
|
} else {
|
||||||
if (seg->use_clocktime) {
|
if (seg->use_clocktime) {
|
||||||
|
|||||||
Reference in New Issue
Block a user