mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
mpc8: Make sure the first stream exists before parsing the seek table
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st> (cherry picked from commit17d57848fc) Signed-off-by: Luca Barbato <lu_zero@gentoo.org> (cherry picked from commit557df77eab)
This commit is contained in:
committed by
Luca Barbato
parent
486c457675
commit
9291012d52
@@ -137,6 +137,11 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
|
||||
int i, t, seekd;
|
||||
GetBitContext gb;
|
||||
|
||||
if (s->nb_streams == 0) {
|
||||
av_log(s, AV_LOG_ERROR, "No stream added before parsing seek table\n");
|
||||
return;
|
||||
}
|
||||
|
||||
avio_seek(s->pb, off, SEEK_SET);
|
||||
mpc8_get_chunk_header(s->pb, &tag, &size);
|
||||
if(tag != TAG_SEEKTABLE){
|
||||
|
||||
Reference in New Issue
Block a user