summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-18 13:41:25 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-18 13:41:47 +0200
commit849bb62c2c9afdb1e81f44870645a6990c4ce1fc (patch)
tree21436d8d1eb3e9d7fbfe74804fabb976d45d149d /libavfilter/avfilter.c
parentd56ced5fbf3c76ebd5c5b015695101c634e53e4a (diff)
parentcebdedca57d95834a8f8098c7b6a322a1163e26b (diff)
Merge commit 'cebdedca57d95834a8f8098c7b6a322a1163e26b'
* commit 'cebdedca57d95834a8f8098c7b6a322a1163e26b': prores: decode alpha plane when it's present avfilter: check a malloc in avfilter_link(). Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/avfilter.c')
-rw-r--r--libavfilter/avfilter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index c96c09c10d..59fc0fa7c4 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -130,8 +130,11 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad,
return AVERROR(EINVAL);
}
- src->outputs[srcpad] =
- dst-> inputs[dstpad] = link = av_mallocz(sizeof(AVFilterLink));
+ link = av_mallocz(sizeof(*link));
+ if (!link)
+ return AVERROR(ENOMEM);
+
+ src->outputs[srcpad] = dst->inputs[dstpad] = link;
link->src = src;
link->dst = dst;