On Sun, 13 Dec 2020 15:51:04 -0300
James Almer <jamr...@gmail.com> wrote:

> Signed-off-by: James Almer <jamr...@gmail.com>
> ---
>  libavcodec/cuviddec.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c
> index 331851231f..49775b5a09 100644
> --- a/libavcodec/cuviddec.c
> +++ b/libavcodec/cuviddec.c
> @@ -634,6 +634,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
>      }
>  
>  error:
> +    if (ret < 0)
> +        av_frame_unref(frame);
> +
>      if (mapped_frame)
>          eret =
> CHECK_CU(ctx->cvdl->cuvidUnmapVideoFrame(ctx->cudecoder,
> mapped_frame)); 

LGTM


--phil
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to