avformat/ac3dec: always skip junk bytes before sync bytes

Fixes #7278.
This commit is contained in:
Paul B Mahol 2018-11-25 12:15:51 +01:00
parent 67cdfcf694
commit f09bbb8f08
2 changed files with 18 additions and 4 deletions

View file

@ -47,7 +47,7 @@ static int ac3_eac3_probe(AVProbeData *p, enum AVCodecID expected_codec_id)
uint16_t frame_size;
int i, ret;
if(!memcmp(buf2, "\x1\x10\0\0\0\0\0\0", 8)) {
if(!memcmp(buf2, "\x1\x10", 2)) {
if (buf2 + 16 > end)
break;
buf2+=16;