1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit '0412cb67cda05b08dfca6bfc4ff664ea917fa932'

* commit '0412cb67cda05b08dfca6bfc4ff664ea917fa932':
  aacdec: Don't count probed ADTS frames if there are false positives

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-03-16 22:25:09 +01:00
commit 6dd007ad99

View File

@ -43,8 +43,16 @@ static int adts_aac_probe(AVProbeData *p)
for (frames = 0; buf2 < end; frames++) {
uint32_t header = AV_RB16(buf2);
if ((header & 0xFFF6) != 0xFFF0)
if ((header & 0xFFF6) != 0xFFF0) {
if (buf != buf0) {
// Found something that isn't an ADTS header, starting
// from a position other than the start of the buffer.
// Discard the count we've accumulated so far since it
// probably was a false positive.
frames = 0;
}
break;
}
fsize = (AV_RB32(buf2 + 3) >> 13) & 0x1FFF;
if (fsize < 7)
break;