[FFmpeg-devel] [FFmpeg-cvslog] avcodec/libvpxdec: reject video and alpha dimension mismatches

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Nov 6 12:20:46 EET 2019


Am Mi., 6. Nov. 2019 um 08:28 Uhr schrieb Marton Balint <git at videolan.org>:
>
> ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Oct 27 18:10:36 2019 +0100| [c54268ce02f71c144d444a5e6d35417d5f043ed5] | committer: James Zern
>
> avcodec/libvpxdec: reject video and alpha dimension mismatches
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> Signed-off-by: James Zern <jzern at google.com>
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c54268ce02f71c144d444a5e6d35417d5f043ed5
> ---
>
>  libavcodec/libvpxdec.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
> index fdd5d458d3..1ae2361167 100644
> --- a/libavcodec/libvpxdec.c
> +++ b/libavcodec/libvpxdec.c
> @@ -283,6 +283,17 @@ static int vpx_decode(AVCodecContext *avctx,
>                  return ret;
>          }
>
> +        if (ctx->has_alpha_channel &&
> +            (img->d_w != img_alpha->d_w ||
> +             img->d_h != img_alpha->d_h ||
> +             img->bit_depth != img_alpha->bit_depth)) {
> +            av_log(avctx, AV_LOG_ERROR,
> +                   "Video dimensions %dx%d@%dbpp differ from alpha dimensions %dx%d@%dbpp\n",
> +                   img->d_w, img->d_h, img->bit_depth,
> +                   img_alpha->d_w, img_alpha->d_h, img_alpha->bit_depth);
> +            return AVERROR_INVALIDDATA;

Shouldn't this be "bpc" instead of "bpp"?

Carl Eugen


More information about the ffmpeg-devel mailing list