mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
nutdec: check chapter creation in decode_info_header
This fixes a segmentation fault when accessing the metadata. Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 3ff1af2b0db7132d5717be6395227a94c8abab07) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
This commit is contained in:
parent
a13a288ec8
commit
9b87d15ca8
@ -505,6 +505,10 @@ static int decode_info_header(NUTContext *nut)
|
||||
nut->time_base[chapter_start %
|
||||
nut->time_base_count],
|
||||
start, start + chapter_len, NULL);
|
||||
if (!chapter) {
|
||||
av_log(s, AV_LOG_ERROR, "could not create chapter\n");
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
metadata = &chapter->metadata;
|
||||
} else if (stream_id_plus1) {
|
||||
st = s->streams[stream_id_plus1 - 1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user