Commit b34257ee authored by Andreas Cadhalpun's avatar Andreas Cadhalpun Committed by Luca Barbato

nut: Check chapter creation in decode_info_header

This fixes a segmentation fault when accessing the metadata.
Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
parent 243e8443
......@@ -487,6 +487,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