On 21/07/2017 15:19, Anton Khirnov wrote:
> If the get_buffer() call fails, the frame might have some side data
> already set. Make sure it gets freed.
> ---
>  libavcodec/decode.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/decode.c b/libavcodec/decode.c
> index 175a6fa..89a6d34 100644
> --- a/libavcodec/decode.c
> +++ b/libavcodec/decode.c
> @@ -1154,6 +1154,9 @@ end:
>          frame->height = avctx->height;
>      }
>  
> +    if (ret < 0)
> +        av_frame_unref(frame);
> +
>      return ret;
>  }
>  
> 

Ok. maybe stable-worthy as well.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to