diff options
Diffstat (limited to 'libavformat/dnxhddec.c')
-rw-r--r-- | libavformat/dnxhddec.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/dnxhddec.c b/libavformat/dnxhddec.c index 37e52d54c2..48c890d185 100644 --- a/libavformat/dnxhddec.c +++ b/libavformat/dnxhddec.c @@ -23,21 +23,22 @@ #include "libavutil/intreadwrite.h" #include "avformat.h" #include "rawdec.h" +#include "libavcodec/dnxhddata.h" static int dnxhd_probe(AVProbeData *p) { - static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01}; int w, h, compression_id; if (p->buf_size < 0x2c) return 0; - if (memcmp(p->buf, header, 5)) + if (avpriv_dnxhd_parse_header_prefix(p->buf) == 0) return 0; h = AV_RB16(p->buf + 0x18); w = AV_RB16(p->buf + 0x1a); if (!w || !h) return 0; compression_id = AV_RB32(p->buf + 0x28); - if (compression_id < 1235 || compression_id > 1260) + if ((compression_id < 1235 || compression_id > 1260) && + (compression_id < 1270 || compression_id > 1274)) return 0; return AVPROBE_SCORE_MAX; } |