diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-04-27 08:29:09 -0700 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-05-03 22:29:13 -0400 |
commit | f8af93ab99a132c268e4ce83736762555e928b96 (patch) | |
tree | 4a73c2c51ef17496fcdabd1372e2915670ff6dfe /libavfilter/avfilter.c | |
parent | 25588d3b8a556eb5d0d3239d8c6aee968ea18896 (diff) | |
download | ffmpeg-f8af93ab99a132c268e4ce83736762555e928b96.tar.gz |
avfilter: don't av_malloc(0).
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 135b9ff0a2..c71c046c53 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) { |