mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 14:01:27 +00:00
avfilter: check a malloc in avfilter_link().
Additionally change sizeof(type) into sizeof(var)
This commit is contained in:
parent
bf5b5d2b15
commit
7e2b15c094
@ -87,8 +87,11 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad,
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
src->outputs[srcpad] =
|
link = av_mallocz(sizeof(*link));
|
||||||
dst-> inputs[dstpad] = link = av_mallocz(sizeof(AVFilterLink));
|
if (!link)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
src->outputs[srcpad] = dst->inputs[dstpad] = link;
|
||||||
|
|
||||||
link->src = src;
|
link->src = src;
|
||||||
link->dst = dst;
|
link->dst = dst;
|
||||||
|
Loading…
Reference in New Issue
Block a user