[FFmpeg-devel] [PATCH 2/4] lavc/qsvdec: check ff_decode_frame_props() return value

Xiang, Haihao haihao.xiang at intel.com
Fri Jan 6 03:34:04 EET 2023


On Do, 2023-01-05 at 12:07 +0100, Anton Khirnov wrote:
> ---
>  libavcodec/qsvdec.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
> index 92bfea196e..6bc85116ad 100644
> --- a/libavcodec/qsvdec.c
> +++ b/libavcodec/qsvdec.c
> @@ -128,7 +128,9 @@ static int qsv_get_continuous_buffer(AVCodecContext
> *avctx, AVFrame *frame,
>  {
>      int ret = 0;
>  
> -    ff_decode_frame_props(avctx, frame);
> +    ret = ff_decode_frame_props(avctx, frame);
> +    if (ret < 0)
> +        return ret;
>  
>      frame->width       = avctx->width;
>      frame->height      = avctx->height;

LGTM, thx

-Haihao



More information about the ffmpeg-devel mailing list