diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-05-24 20:42:11 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-05-24 20:42:11 +0000 |
commit | c956dd431fc53d7181fb9de9bb9c4b7067ab7c4f (patch) | |
tree | 8faca2872efc44d9493b15bd0f868f5840014a01 /libavfilter | |
parent | e97908ee703601275d176cb64b863d83321e6c1e (diff) | |
download | ffmpeg-c956dd431fc53d7181fb9de9bb9c4b7067ab7c4f.tar.gz |
Use av_mallocz instead of av_malloc to simplify some code
Commited in SoC by Vitor Sessak on 2008-05-24 16:53:33
Originally committed as revision 13352 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/graphparser.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index 85544d01a5..14cd651af0 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -241,8 +241,7 @@ static int link_filter_inouts(AVFilterContext *filter, pad = filter->output_count; while(pad--) { - AVFilterInOut *currlinkn = av_malloc(sizeof(AVFilterInOut)); - currlinkn->name = NULL; + AVFilterInOut *currlinkn = av_mallocz(sizeof(AVFilterInOut)); currlinkn->type = LinkTypeOut; currlinkn->filter = filter; currlinkn->pad_idx = pad; @@ -280,11 +279,10 @@ static int parse_inputs(const char **buf, AVFilterInOut **currInputs, link_to_add = match; } else { /* Not in the list, so add it as an input */ - link_to_add = av_malloc(sizeof(AVFilterInOut)); + link_to_add = av_mallocz(sizeof(AVFilterInOut)); link_to_add->name = name; link_to_add->type = LinkTypeIn; - link_to_add->filter = NULL; link_to_add->pad_idx = pad; } |