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
241 241
242 pad = filter->output_count;242 pad = filter->output_count;
243 while(pad--) {243 while(pad--) {
244 AVFilterInOut *currlinkn = av_malloc(sizeof(AVFilterInOut));244 AVFilterInOut *currlinkn = av_mallocz(sizeof(AVFilterInOut));
245 currlinkn->name = NULL;
246 currlinkn->type = LinkTypeOut;245 currlinkn->type = LinkTypeOut;
247 currlinkn->filter = filter;246 currlinkn->filter = filter;
248 currlinkn->pad_idx = pad;247 currlinkn->pad_idx = pad;
@@ -280,11 +279,10 @@ static int parse_inputs(const char **buf, AVFilterInOut **currInputs, · 31 unmodified lines
280 link_to_add = match;279 link_to_add = match;
281 } else {280 } else {
282 /* Not in the list, so add it as an input */281 /* 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));
284 283
285 link_to_add->name = name;284 link_to_add->name = name;
286 link_to_add->type = LinkTypeIn;285 link_to_add->type = LinkTypeIn;
287 link_to_add->filter = NULL;
288 link_to_add->pad_idx = pad;286 link_to_add->pad_idx = pad;
289 }287 }
290 288

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