mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
nut: Check chapter creation in decode_info_header
This fixes a segmentation fault when accessing the metadata. Signed-off-by: Luca Barbato <lu_zero@gentoo.org> CC: libav-stable@libav.org
This commit is contained in:
parent
243e8443cd
commit
b34257eefd
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user