History

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

Fixes mpegts-in-mov, ticket #987 / issue 2223.

Carl Eugen Hoyos committed 14 years ago

Commit 2fdc6f31 parent 8b03cd31 file · +8 −1Browse files

Unified · Split

libavformat/mov.c+8−1
@@ -2879,7 +2879,14 @@ static int mov_probe(AVProbeData *p) · 2878 unmodified lines
2879 case MKTAG('p','n','o','t'): /* detect movs with preview pics like ew.mov and april.mov */2879 case MKTAG('p','n','o','t'): /* detect movs with preview pics like ew.mov and april.mov */
2880 case MKTAG('u','d','t','a'): /* Packet Video PVAuthor adds this and a lot of more junk */2880 case MKTAG('u','d','t','a'): /* Packet Video PVAuthor adds this and a lot of more junk */
2881 case MKTAG('f','t','y','p'):2881 case MKTAG('f','t','y','p'):
2882 score = AVPROBE_SCORE_MAX;2882 if (AV_RB32(p->buf+offset) < 8 &&
2883 (AV_RB32(p->buf+offset) != 1 ||
2884 offset + 12 > (unsigned int)p->buf_size ||
2885 AV_RB64(p->buf+offset + 8) == 0)) {
2886 score = FFMAX(score, AVPROBE_SCORE_MAX - 50);
2887 } else {
2888 score = AVPROBE_SCORE_MAX;
2889 }
2883 offset = FFMAX(4, AV_RB32(p->buf+offset)) + offset;2890 offset = FFMAX(4, AV_RB32(p->buf+offset)) + offset;
2884 break;2891 break;
2885 /* those are more common words, so rate then a bit less */2892 /* those are more common words, so rate then a bit less */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t