mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 03:59:43 +00:00
Do not detect "00000000..." (and other non-changing values) as adp.
This commit is contained in:
parent
45fd4ec9ef
commit
c5a837658a
@ -26,14 +26,21 @@
|
||||
|
||||
static int adp_probe(AVProbeData *p)
|
||||
{
|
||||
int i;
|
||||
int i, changes = 0;
|
||||
char last = 0;
|
||||
|
||||
if (p->buf_size < 32)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < p->buf_size - 3; i+=32)
|
||||
for (i = 0; i < p->buf_size - 3; i+=32) {
|
||||
if (p->buf[i] != p->buf[i+2] || p->buf[i+1] != p->buf[i+3])
|
||||
return 0;
|
||||
if (p->buf[i] != last)
|
||||
changes++;
|
||||
last = p->buf[i];
|
||||
}
|
||||
if (changes <= 1)
|
||||
return 0;
|
||||
|
||||
return p->buf_size < 260 ? 1 : AVPROBE_SCORE_MAX / 4;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user