diff mbox

[FFmpeg-devel,v1,1/2] avfilter/vf_colormatrix: av_frame_free(&in) in case of error

Message ID 20191127104651.20314-1-lance.lmwang@gmail.com
State New
Headers show

Commit Message

Lance Wang Nov. 27, 2019, 10:46 a.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/vf_colormatrix.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Lance Wang Dec. 24, 2019, 1:14 a.m. UTC | #1
On Wed, Nov 27, 2019 at 06:46:50PM +0800, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
> 
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavfilter/vf_colormatrix.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
> index 3a02e2b86e..3a0c3f01da 100644
> --- a/libavfilter/vf_colormatrix.c
> +++ b/libavfilter/vf_colormatrix.c
> @@ -448,6 +448,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
>          case AVCOL_SPC_BT2020_CL : source = COLOR_MODE_BT2020    ; break;
>          default :
>              av_log(ctx, AV_LOG_ERROR, "Input frame does not specify a supported colorspace, and none has been specified as source either\n");
> +            av_frame_free(&in);
>              av_frame_free(&out);
>              return AVERROR(EINVAL);

ping

>          }
> -- 
> 2.21.0
>
diff mbox

Patch

diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c
index 3a02e2b86e..3a0c3f01da 100644
--- a/libavfilter/vf_colormatrix.c
+++ b/libavfilter/vf_colormatrix.c
@@ -448,6 +448,7 @@  static int filter_frame(AVFilterLink *link, AVFrame *in)
         case AVCOL_SPC_BT2020_CL : source = COLOR_MODE_BT2020    ; break;
         default :
             av_log(ctx, AV_LOG_ERROR, "Input frame does not specify a supported colorspace, and none has been specified as source either\n");
+            av_frame_free(&in);
             av_frame_free(&out);
             return AVERROR(EINVAL);
         }