X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fexr.c;h=5253cc3f136c7ffd32ad726acc73f721a6ca8a1c;hb=6dbb64fdccafe846aaec75d3784f7ad49d8af5df;hp=47f59bd638d7a9d383e5656d509379302b70cbd2;hpb=cacb47633c043a4bafb6872716dd8c4479dc4df1;p=ffmpeg diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 47f59bd638d..5253cc3f136 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -899,7 +899,7 @@ static int pxr24_uncompress(EXRContext *s, const uint8_t *src, static void unpack_14(const uint8_t b[14], uint16_t s[16]) { - unsigned short shift = (b[ 2] >> 2); + unsigned short shift = (b[ 2] >> 2) & 15; unsigned short bias = (0x20 << shift); int i; @@ -1350,12 +1350,14 @@ static int decode_header(EXRContext *s, AVFrame *frame) flags = bytestream2_get_le24(&s->gb); - if (flags == 0x00) - s->is_tile = 0; - else if (flags & 0x02) + if (flags & 0x02) s->is_tile = 1; - else{ - avpriv_report_missing_feature(s->avctx, "flags %d", flags); + if (flags & 0x08) { + avpriv_report_missing_feature(s->avctx, "deep data"); + return AVERROR_PATCHWELCOME; + } + if (flags & 0x10) { + avpriv_report_missing_feature(s->avctx, "multipart"); return AVERROR_PATCHWELCOME; }