[vlc-commits] ci_filters: use malloc instead of calloc

Thomas Guillem git at videolan.org
Fri Jan 10 13:02:11 CET 2020


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan  9 17:59:52 2020 +0100| [e0d88d3bce4e75f9332a5ca8db8034ccca870fce] | committer: Thomas Guillem

ci_filters: use malloc instead of calloc

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e0d88d3bce4e75f9332a5ca8db8034ccca870fce
---

 modules/video_filter/ci_filters.m | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/video_filter/ci_filters.m b/modules/video_filter/ci_filters.m
index ce5963fc4a..624c2c3f16 100644
--- a/modules/video_filter/ci_filters.m
+++ b/modules/video_filter/ci_filters.m
@@ -593,10 +593,13 @@ Open(vlc_object_t *obj, char const *psz_filter)
     struct ci_filters_ctx *ctx = var_InheritAddress(filter, "ci-filters-ctx");
     if (!ctx)
     {
-        ctx = calloc(1, sizeof(*ctx));
+        ctx = malloc(sizeof(*ctx));
         if (!ctx)
             goto error;
 
+        ctx->src_converter = ctx->dst_converter = NULL;
+        ctx->fchain = NULL;
+        ctx->cvpx_pool = nil;
         ctx->cvpx_pool_fmt = filter->fmt_out.video;
 
         if (filter->fmt_in.video.i_chroma != VLC_CODEC_CVPX_NV12



More information about the vlc-commits mailing list