CC: libav-sta...@libav.org Bug-Id: CID 1087089 --- libavcodec/proresenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index 3a82c2c..df9b834 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -559,13 +559,14 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic, mbs_per_slice, ctx->blocks[0], num_cblocks, plane_factor, qmat); - } else { + } else if (i == 3) { get_alpha_data(ctx, src, linesize, xp, yp, pwidth, avctx->height / ctx->pictures_per_frame, ctx->blocks[0], mbs_per_slice, ctx->alpha_bits); sizes[i] = encode_alpha_plane(ctx, pb, mbs_per_slice, ctx->blocks[0], quant); - } + } else + return AVERROR_INVALIDDATA; total_size += sizes[i]; if (put_bits_left(pb) < 0) { av_log(avctx, AV_LOG_ERROR, -- 1.9.3 (Apple Git-50) _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel