[FFmpeg-devel] [PATCH] avcodec/h264_parse: Fix error code in decode_extradata

Anton Khirnov anton at khirnov.net
Thu Mar 28 10:16:52 EET 2024


Quoting Zhao Zhili (2024-03-26 03:59:00)
> From: Zhao Zhili <zhilizhao at tencent.com>
> 
> ---
>  libavcodec/h264_parse.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c
> index 3378650fd5..09d3b9dc05 100644
> --- a/libavcodec/h264_parse.c
> +++ b/libavcodec/h264_parse.c
> @@ -468,7 +468,7 @@ int ff_h264_decode_extradata(const uint8_t *data, int size, H264ParamSets *ps,
>      int ret;
>  
>      if (!data || size <= 0)
> -        return -1;
> +        return AVERROR(EINVAL);

Ok

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list