[FFmpeg-cvslog] avfilter/vf_hwupload_cuda: fix potential leak

Timo Rothenpieler git at videolan.org
Wed Nov 30 13:42:39 EET 2016


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Tue Nov 29 17:40:18 2016 +0100| [7dafb3a25a580a5f8f1a5083835c67be9ed17043] | committer: Timo Rothenpieler

avfilter/vf_hwupload_cuda: fix potential leak

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7dafb3a25a580a5f8f1a5083835c67be9ed17043
---

 libavfilter/vf_hwupload_cuda.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_hwupload_cuda.c b/libavfilter/vf_hwupload_cuda.c
index 14688df..b9c2db6 100644
--- a/libavfilter/vf_hwupload_cuda.c
+++ b/libavfilter/vf_hwupload_cuda.c
@@ -64,12 +64,14 @@ static int cudaupload_query_formats(AVFilterContext *ctx)
         AV_PIX_FMT_CUDA, AV_PIX_FMT_NONE,
     };
     AVFilterFormats *in_fmts  = ff_make_format_list(input_pix_fmts);
-    AVFilterFormats *out_fmts = ff_make_format_list(output_pix_fmts);
+    AVFilterFormats *out_fmts;
 
     ret = ff_formats_ref(in_fmts, &ctx->inputs[0]->out_formats);
     if (ret < 0)
         return ret;
 
+    out_fmts = ff_make_format_list(output_pix_fmts);
+
     ret = ff_formats_ref(out_fmts, &ctx->outputs[0]->in_formats);
     if (ret < 0)
         return ret;



More information about the ffmpeg-cvslog mailing list