From fa51c88f305bc8a555b7c8ecc53bb3fe30145278 Mon Sep 17 00:00:00 2001 From: Wenbin Chen Date: Wed, 8 Feb 2023 16:04:50 +0800 Subject: [PATCH] libavfilter/qsvvpp: check the return value Signed-off-by: Wenbin Chen --- libavfilter/qsvvpp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index e181e7b5846..54e7284234b 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -441,7 +441,10 @@ static QSVFrame *submit_frame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame *p return NULL; } - av_frame_copy_props(qsv_frame->frame, picref); + if (av_frame_copy_props(qsv_frame->frame, picref) < 0) { + av_frame_free(&qsv_frame->frame); + return NULL; + } } else qsv_frame->frame = av_frame_clone(picref);