mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/matroskadec: Check avpriv_new_chapter() for failure
Fixes null pointer dereference Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1ba7c6ead2
commit
87dc8b3af9
|
@ -2161,8 +2161,10 @@ static int matroska_read_header(AVFormatContext *s)
|
|||
(AVRational) { 1, 1000000000 },
|
||||
chapters[i].start, chapters[i].end,
|
||||
chapters[i].title);
|
||||
av_dict_set(&chapters[i].chapter->metadata,
|
||||
"title", chapters[i].title, 0);
|
||||
if (chapters[i].chapter) {
|
||||
av_dict_set(&chapters[i].chapter->metadata,
|
||||
"title", chapters[i].title, 0);
|
||||
}
|
||||
max_start = chapters[i].start;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue