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

Submitted by lance.lmwang@gmail.com on Nov. 27, 2019, 10:46 a.m.

Details

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

Commit Message

lance.lmwang@gmail.com Nov. 27, 2019, 10:46 a.m.
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(+)

Patch hide | download patch | download mbox

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);
         }