diff mbox series

[FFmpeg-devel] libavfilter/vf_vpp_qsv: fix uninitialized variable problem

Message ID 20210915051518.3661952-1-wenbin.chen@intel.com
State Accepted
Commit a822e70becdec99363d1995a4fa44d3500d22c03
Headers show
Series [FFmpeg-devel] libavfilter/vf_vpp_qsv: fix uninitialized variable problem
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Chen, Wenbin Sept. 15, 2021, 5:15 a.m. UTC
This two variables may be used below with uninitialized value.
Now fix them.

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

Comments

Xiang, Haihao Sept. 15, 2021, 5:56 a.m. UTC | #1
On Wed, 2021-09-15 at 13:15 +0800, Wenbin Chen wrote:
> This two variables may be used below with uninitialized value.
> Now fix them.
> 
> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
> ---
>  libavfilter/vf_vpp_qsv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
> index c268b5dba8..22ffe0d7f3 100644
> --- a/libavfilter/vf_vpp_qsv.c
> +++ b/libavfilter/vf_vpp_qsv.c
> @@ -501,8 +501,8 @@ static int activate(AVFilterContext *ctx)
>      VPPContext *s =ctx->priv;
>      QSVVPPContext *qsv = s->qsv;
>      AVFrame *in = NULL;
> -    int ret, status;
> -    int64_t pts;
> +    int ret, status = 0;
> +    int64_t pts = AV_NOPTS_VALUE;
>  
>      FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink);

LGTM

Thanks
Haihao
Soft Works Sept. 15, 2021, 5:58 a.m. UTC | #2
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Wenbin Chen
> Sent: Wednesday, 15 September 2021 07:15
> To: ffmpeg-devel@ffmpeg.org
> Cc: Wenbin Chen <wenbin.chen@intel.com>
> Subject: [FFmpeg-devel] [PATCH] libavfilter/vf_vpp_qsv: fix
> uninitialized variable problem
> 
> This two variables may be used below with uninitialized value.
> Now fix them.
> 
> Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
> ---
>  libavfilter/vf_vpp_qsv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
> index c268b5dba8..22ffe0d7f3 100644
> --- a/libavfilter/vf_vpp_qsv.c
> +++ b/libavfilter/vf_vpp_qsv.c
> @@ -501,8 +501,8 @@ static int activate(AVFilterContext *ctx)
>      VPPContext *s =ctx->priv;
>      QSVVPPContext *qsv = s->qsv;
>      AVFrame *in = NULL;
> -    int ret, status;
> -    int64_t pts;
> +    int ret, status = 0;
> +    int64_t pts = AV_NOPTS_VALUE;
> 
>      FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink);
> 
> --

LGTM
diff mbox series

Patch

diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c
index c268b5dba8..22ffe0d7f3 100644
--- a/libavfilter/vf_vpp_qsv.c
+++ b/libavfilter/vf_vpp_qsv.c
@@ -501,8 +501,8 @@  static int activate(AVFilterContext *ctx)
     VPPContext *s =ctx->priv;
     QSVVPPContext *qsv = s->qsv;
     AVFrame *in = NULL;
-    int ret, status;
-    int64_t pts;
+    int ret, status = 0;
+    int64_t pts = AV_NOPTS_VALUE;
 
     FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink);