summaryrefslogtreecommitdiff
path: root/libavcodec/dpx.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-08-13 01:44:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-14 04:31:07 +0200
commit7cdef77b50360c4294e50115fe6d0ee46fc9a9d9 (patch)
tree21e0b084b0dcb352fc016314c3aaa17116693848 /libavcodec/dpx.c
parent69849a2d6ecc25bd20cb4fc656979f57627ffb24 (diff)
dpx: warn if encrypted
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dpx.c')
-rw-r--r--libavcodec/dpx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 5f05cd81be..d8fb4e077b 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);