[FFmpeg-devel] [PATCH] libavfilter/qsvvpp: check the return value
Xiang, Haihao
haihao.xiang at intel.com
Sun Feb 12 10:45:11 EET 2023
On Wo, 2023-02-08 at 16:04 +0800, wenbin.chen-at-intel.com at ffmpeg.org wrote:
> From: Wenbin Chen <wenbin.chen at intel.com>
>
> Signed-off-by: Wenbin Chen <wenbin.chen at intel.com>
> ---
> libavfilter/qsvvpp.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c
> index e181e7b584..54e7284234 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);
>
LGTM, will apply.
Thanks
Haihao
More information about the ffmpeg-devel
mailing list