diff options
author | Mark Reid <mindmark@gmail.com> | 2016-02-13 21:44:32 -0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-14 19:17:36 +0100 |
commit | 8395b6eeaa279cff5c1c5d2b2ddfd5be087ca3ee (patch) | |
tree | 1b5834e1adcacc81f73f312ed413bcb72076a3e6 /libavformat/dnxhddec.c | |
parent | b8bc6b14a556e11e3f6cb49ead9d21d9a769b7c8 (diff) |
libavcodec/dnxhd_parser: add parser and probe support raw 444 and dnxhr formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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; } |