diff mbox series

[FFmpeg-devel] libavfilter/qsvvpp: check the return value

Message ID 20230208080450.311473-1-wenbin.chen@intel.com
State Accepted
Commit b7a335c5e9d2cd47dc8adeca2edc6714fa2d2996
Headers show
Series [FFmpeg-devel] libavfilter/qsvvpp: check the return value | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 fail Make fate failed
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed

Commit Message

Chen, Wenbin Feb. 8, 2023, 8:04 a.m. UTC
From: Wenbin Chen <wenbin.chen@intel.com>

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
---
 libavfilter/qsvvpp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Xiang, Haihao Feb. 12, 2023, 8:45 a.m. UTC | #1
On Wo, 2023-02-08 at 16:04 +0800, wenbin.chen-at-intel.com@ffmpeg.org wrote:
> From: Wenbin Chen <wenbin.chen@intel.com>
> 
> Signed-off-by: Wenbin Chen <wenbin.chen@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
diff mbox series

Patch

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