[FFmpeg-devel] [PATCH] fix few compiler warnings

Michael Niedermayer michael at niedermayer.cc
Thu Jun 2 13:47:58 CEST 2016


On Sun, May 22, 2016 at 01:51:05AM +0000, Davinder Singh wrote:
[...]

>  vf_hwdownload.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 5eb7416fececde847414f37de9a78a4e1cd5e1af  0004-libavfilter-vf_hwdownload-show-error-when-ff_formats.patch
> From d1d00989a374facba3cdf777d95c61bf385f1332 Mon Sep 17 00:00:00 2001
> From: dsmudhar <ds.mudhar at gmail.com>
> Date: Sun, 22 May 2016 06:26:36 +0530
> Subject: [PATCH 4/7] libavfilter/vf_hwdownload: show error when ff_formats_ref
>  fails
> 
> ---
>  libavfilter/vf_hwdownload.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c
> index 2dcc9fa..79ea82d 100644
> --- a/libavfilter/vf_hwdownload.c
> +++ b/libavfilter/vf_hwdownload.c
> @@ -56,8 +56,10 @@ static int hwdownload_query_formats(AVFilterContext *avctx)
>          }
>      }
>  
> -    ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats);
> -    ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats);
> +    if ((err = ff_formats_ref(infmts,  &avctx->inputs[0]->out_formats)) < 0 ||
> +        (err = ff_formats_ref(outfmts, &avctx->outputs[0]->in_formats)) < 0)
> +        return err;

according to coverity this introduces a memleak
(1362184)
ill send you an invite so you can take a look

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160602/4551faad/attachment.sig>


More information about the ffmpeg-devel mailing list