X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fac3dec.c;h=f1421dc05886b317e6cf8656009e648388f6f87f;hb=c402c1c976dc5bd63908d1aaff5b60521cbbee92;hp=5d4d2f64c5f0ad492883053fb0c3ae52df1f8f85;hpb=60b54e4b9fac8519bb68501b73ac0efbcce5cff0;p=ffmpeg diff --git a/libavformat/ac3dec.c b/libavformat/ac3dec.c index 5d4d2f64c5f..f1421dc0588 100644 --- a/libavformat/ac3dec.c +++ b/libavformat/ac3dec.c @@ -40,8 +40,10 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) buf2 = buf; for(frames = 0; buf2 < end; frames++) { + if(!memcmp(buf2, "\x1\x10\0\0\0\0\0\0", 8)) + buf2+=16; init_get_bits(&gbc, buf2, 54); - if(ff_ac3_parse_header(&gbc, &hdr) < 0) + if(avpriv_ac3_parse_header(&gbc, &hdr) < 0) break; if(buf2 + hdr.frame_size > end || av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2)) @@ -58,7 +60,7 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id) // keep this in sync with mp3 probe, both need to avoid // issues with MPEG-files! if (first_frames>=4) return AVPROBE_SCORE_MAX/2+1; - else if(max_frames>500)return AVPROBE_SCORE_MAX/2; + else if(max_frames>200)return AVPROBE_SCORE_MAX/2; else if(max_frames>=4) return AVPROBE_SCORE_MAX/4; else if(max_frames>=1) return 1; else return 0;