2014-08-13 21:35 GMT+02:00 Reimar Döffinger <reimar.doeffin...@gmx.de>: > Personally I'd probably go with the missing feature and a warning > message on top instead of the return.
Same opinion, here's an updated patch.
From 47f363c96c3dd15e7e36267ccdb338b102d40078 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet <christophe.gisq...@gmail.com> Date: Wed, 13 Aug 2014 01:44:40 +0200 Subject: [PATCH 3/4] dpx: warn if encrypted --- libavcodec/dpx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 8cd7d73..6c4951b 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -108,6 +108,16 @@ 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"); + av_log(avctx, AV_LOG_WARNING, "The image is encrypted and may " + "not properly decode.\n"); + } + // Need to end in 0x304 offset from start of file buf = avpkt->data + 0x304; w = read32(&buf, endian); -- 1.9.2.msysgit.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel