History

Merge commit '1b891d17c531e8a63c2974aab4bf997ce70746f3'

* commit '1b891d17c531e8a63c2974aab4bf997ce70746f3': avconv: fix bitrate report when writing to /dev/null avfilter: fix graphparser memleaks on error paths rawdec: remove ff_raw_read_header pcmdec: remove dependency from rawdec g722: refactor out of rawdec.c rawvideo: use a specific read_header Conflicts: ffmpeg.c libavformat/Makefile libavformat/rawdec.c

Michael Niedermayer committed 14 years ago

Commit 507f2942 parents 9f36ec6 1b891d18 files · +199 −141Browse files

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

Unified · Split

libavfilter/graphparser.c+15−9
@@ -239,10 +239,11 @@ static int link_filter_inouts(AVFilterContext *filt_ctx, · 238 unmodified lines
239 return AVERROR(ENOMEM);239 return AVERROR(ENOMEM);
240 240
241 if (p->filter_ctx) {241 if (p->filter_ctx) {
242 if ((ret = link_filter(p->filter_ctx, p->pad_idx, filt_ctx, pad, log_ctx)) < 0)242 ret = link_filter(p->filter_ctx, p->pad_idx, filt_ctx, pad, log_ctx);
243 return ret;
244 av_free(p->name);243 av_free(p->name);
245 av_free(p);244 av_free(p);
245 if (ret < 0)
246 return ret;
246 } else {247 } else {
247 p->filter_ctx = filt_ctx;248 p->filter_ctx = filt_ctx;
248 p->pad_idx = pad;249 p->pad_idx = pad;
@@ -290,8 +291,10 @@ static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs, · 41 unmodified lines
290 av_free(name);291 av_free(name);
291 } else {292 } else {
292 /* Not in the list, so add it as an input */293 /* Not in the list, so add it as an input */
293 if (!(match = av_mallocz(sizeof(AVFilterInOut))))294 if (!(match = av_mallocz(sizeof(AVFilterInOut)))) {
295 av_free(name);
294 return AVERROR(ENOMEM);296 return AVERROR(ENOMEM);
297 }
295 match->name = name;298 match->name = name;
296 match->pad_idx = pad;299 match->pad_idx = pad;
297 }300 }
@@ -319,24 +322,27 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, · 21 unmodified lines
319 AVFilterInOut *match;322 AVFilterInOut *match;
320 323
321 AVFilterInOut *input = *curr_inputs;324 AVFilterInOut *input = *curr_inputs;
325
326 if (!name)
327 return AVERROR(EINVAL);
328
322 if (!input) {329 if (!input) {
323 av_log(log_ctx, AV_LOG_ERROR,330 av_log(log_ctx, AV_LOG_ERROR,
324 "No output pad can be associated to link label '%s'.\n",331 "No output pad can be associated to link label '%s'.\n", name);
325 name);332 av_free(name);
326 return AVERROR(EINVAL);333 return AVERROR(EINVAL);
327 }334 }
328 *curr_inputs = (*curr_inputs)->next;335 *curr_inputs = (*curr_inputs)->next;
329 336
330 if (!name)
331 return AVERROR(EINVAL);
332
333 /* First check if the label is not in the open_inputs list */337 /* First check if the label is not in the open_inputs list */
334 match = extract_inout(name, open_inputs);338 match = extract_inout(name, open_inputs);
335 339
336 if (match) {340 if (match) {
337 if ((ret = link_filter(input->filter_ctx, input->pad_idx,341 if ((ret = link_filter(input->filter_ctx, input->pad_idx,
338 match->filter_ctx, match->pad_idx, log_ctx)) < 0)342 match->filter_ctx, match->pad_idx, log_ctx)) < 0) {
343 av_free(name);
339 return ret;344 return ret;
345 }
340 av_free(match->name);346 av_free(match->name);
341 av_free(name);347 av_free(name);
342 av_free(match);348 av_free(match);

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