Commit a2dab751 authored by Paul B Mahol's avatar Paul B Mahol

exr: compression attribute is mandatory

Do not continue decoding if one is missing.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 55de89e2
......@@ -446,6 +446,11 @@ static int decode_frame(AVCodecContext *avctx,
}
}
if (s->compr == -1) {
av_log(avctx, AV_LOG_ERROR, "Missing compression attribute\n");
return AVERROR_INVALIDDATA;
}
if (buf >= buf_end) {
av_log(avctx, AV_LOG_ERROR, "Incomplete frame\n");
return AVERROR_INVALIDDATA;
......@@ -642,6 +647,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
avcodec_get_frame_defaults(&s->picture);
avctx->coded_frame = &s->picture;
s->compr = -1;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment