X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fexr.c;h=0f8b0fda9f2c8b343bcc0e5fc434a9f7dd101af9;hb=0fef412dffb74fef3494f7fae0c138c32a444484;hp=5253cc3f136c7ffd32ad726acc73f721a6ca8a1c;hpb=2d62e06ff6a9f3dbd78136c1dc4a315a727c6f00;p=ffmpeg diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 5253cc3f136..0f8b0fda9f2 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1389,6 +1389,7 @@ static int decode_header(EXRContext *s, AVFrame *frame) if (*ch_gb.buffer == '.') ch_gb.buffer++; /* skip dot if not given */ } else { + layer_match = 0; av_log(s->avctx, AV_LOG_INFO, "Channel doesn't match layer : %s.\n", ch_gb.buffer); } @@ -1463,6 +1464,11 @@ static int decode_header(EXRContext *s, AVFrame *frame) } s->pixel_type = current_pixel_type; s->channel_offsets[channel_index] = s->current_channel_offset; + } else if (channel_index >= 0) { + av_log(s->avctx, AV_LOG_ERROR, + "Multiple channels with index %d.\n", channel_index); + ret = AVERROR_INVALIDDATA; + goto fail; } s->channels = av_realloc(s->channels,