[FFmpeg-devel] [PATCH 3/4] dpx: abort if encrypted

Christophe Gisquet christophe.gisquet at gmail.com
Wed Aug 13 12:21:53 CEST 2014


---
 libavcodec/dpx.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 8cd7d73..2ad7527 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -108,6 +108,15 @@ static int decode_frame(AVCodecContext *avctx,
         av_log(avctx, AV_LOG_ERROR, "Invalid data start offset\n");
         return AVERROR_INVALIDDATA;
     }
+
+    // Check encryption
+    buf = avpkt->data + 660;
+    ret = read32(&buf, endian);
+    if (ret != 0xFFFFFFFF) {
+        avpriv_report_missing_feature(avctx, "Encryption");
+        return AVERROR_PATCHWELCOME;
+    }
+
     // Need to end in 0x304 offset from start of file
     buf = avpkt->data + 0x304;
     w = read32(&buf, endian);
-- 
1.9.2.msysgit.0



More information about the ffmpeg-devel mailing list