Fixes mpegts-in-mov, ticket #987 / issue 2223.
Unified · Split
| @@ -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 */ |