Commit 3ff1af2b authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Michael Niedermayer

nutdec: check chapter creation in decode_info_header

This fixes a segmentation fault when accessing the metadata.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 66211058
......@@ -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];
......
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