[FFmpeg-cvslog] avfilter: don't av_malloc(0).

Ronald S. Bultje git at videolan.org
Thu May 5 03:30:44 CEST 2011


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed Apr 27 08:29:09 2011 -0700| [f8af93ab99a132c268e4ce83736762555e928b96] | committer: Ronald S. Bultje

avfilter: don't av_malloc(0).

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

 libavfilter/avfilter.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 135b9ff..c71c046 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -587,7 +587,8 @@ int avfilter_open(AVFilterContext **filter_ctx, AVFilter *filter, const char *in
     ret->av_class = &avfilter_class;
     ret->filter   = filter;
     ret->name     = inst_name ? av_strdup(inst_name) : NULL;
-    ret->priv     = av_mallocz(filter->priv_size);
+    if (filter->priv_size)
+        ret->priv     = av_mallocz(filter->priv_size);
 
     ret->input_count  = pad_count(filter->inputs);
     if (ret->input_count) {



More information about the ffmpeg-cvslog mailing list