[FFmpeg-devel] [PATCH 2/3] avcodec/videotoolboxenc: pass error code through

Tomas Härdin git at haerdin.se
Tue Jan 3 20:11:43 EET 2023


tis 2023-01-03 klockan 18:18 +0800 skrev Zhao Zhili:
> From: Zhao Zhili <zhilizhao at tencent.com>
> 
> Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>
> ---
>  libavcodec/videotoolboxenc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/videotoolboxenc.c
> b/libavcodec/videotoolboxenc.c
> index 27db4e0d5e..3b00e542cb 100644
> --- a/libavcodec/videotoolboxenc.c
> +++ b/libavcodec/videotoolboxenc.c
> @@ -2156,7 +2156,7 @@ static int get_cv_pixel_info(
>  
>      status = get_cv_pixel_format(avctx, av_format, av_color_range,
> color, &range_guessed);
>      if (status)
> -        return AVERROR(EINVAL);
> +        return status;
>  
>      if (range_guessed) {
>          if (!vtctx->warned_color_range) {
> @@ -2338,7 +2338,7 @@ static int
> create_cv_pixel_buffer(AVCodecContext   *avctx,
>              status
>          );
>  
> -        return AVERROR_EXTERNAL;
> +        return status;

Are these guaranteed to always be negative?

/Tomas



More information about the ffmpeg-devel mailing list