]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/dnxhddec.c
lavf/riffenc: Handle AV_PIX_FMT_MONOBLACK
[ffmpeg] / libavformat / dnxhddec.c
index 37e52d54c274c44317f283b859ea23a2cf35a313..48c890d1853dff7a909ad0959908edbed27610d8 100644 (file)
 #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;
 }