History

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

Vitor Sessak committed 18 years ago

Commit c956dd41 parent e97908e1 file · +2 −4Browse files

Showing the changes to libavfilter/graphparser.c (1 of 1 file). Show all

Unified · Split

libavfilter/graphparser.c+2−4
@@ -241,8 +241,7 @@ static int link_filter_inouts(AVFilterContext *filter, · 240 unmodified lines
241241
242242 pad = filter->output_count;
243243 while(pad--) {
244− AVFilterInOut *currlinkn = av_malloc(sizeof(AVFilterInOut));
245− currlinkn->name = NULL;
244+ AVFilterInOut *currlinkn = av_mallocz(sizeof(AVFilterInOut));
246245 currlinkn->type = LinkTypeOut;
247246 currlinkn->filter = filter;
248247 currlinkn->pad_idx = pad;
@@ -280,11 +279,10 @@ static int parse_inputs(const char **buf, AVFilterInOut **currInputs, · 31 unmodified lines
280279 link_to_add = match;
281280 } else {
282281 /* Not in the list, so add it as an input */
283− link_to_add = av_malloc(sizeof(AVFilterInOut));
282+ link_to_add = av_mallocz(sizeof(AVFilterInOut));
284283
285284 link_to_add->name = name;
286285 link_to_add->type = LinkTypeIn;
287− link_to_add->filter = NULL;
288286 link_to_add->pad_idx = pad;
289287 }
290288

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t