On 13.08.2014, at 13:48, Paul B Mahol <one...@gmail.com> wrote: > On 8/13/14, Christophe Gisquet <christophe.gisq...@gmail.com> wrote: >> --- >> 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); > > Does dpx encoder needs modification too?
More specifically: how certain is it this value is always correct? Failing to play an unencrypted file just because of a wrong flag (or even a single-bit corruption!) seems worse to me than trying to play an encrypted file. I.e. shouldn't this rather just be a warning than hard failure? _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel