Commit 2fdc6f35 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Do not detect mov with maximum score if the atom size is too small.

Fixes mpegts-in-mov, ticket #987 / issue 2223.
parent 8b03cd3c
...@@ -2879,7 +2879,14 @@ static int mov_probe(AVProbeData *p) ...@@ -2879,7 +2879,14 @@ static int mov_probe(AVProbeData *p)
case MKTAG('p','n','o','t'): /* detect movs with preview pics like ew.mov and april.mov */ case MKTAG('p','n','o','t'): /* detect movs with preview pics like ew.mov and april.mov */
case MKTAG('u','d','t','a'): /* Packet Video PVAuthor adds this and a lot of more junk */ case MKTAG('u','d','t','a'): /* Packet Video PVAuthor adds this and a lot of more junk */
case MKTAG('f','t','y','p'): case MKTAG('f','t','y','p'):
if (AV_RB32(p->buf+offset) < 8 &&
(AV_RB32(p->buf+offset) != 1 ||
offset + 12 > (unsigned int)p->buf_size ||
AV_RB64(p->buf+offset + 8) == 0)) {
score = FFMAX(score, AVPROBE_SCORE_MAX - 50);
} else {
score = AVPROBE_SCORE_MAX; score = AVPROBE_SCORE_MAX;
}
offset = FFMAX(4, AV_RB32(p->buf+offset)) + offset; offset = FFMAX(4, AV_RB32(p->buf+offset)) + offset;
break; break;
/* those are more common words, so rate then a bit less */ /* those are more common words, so rate then a bit less */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment