summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-09-15 21:47:48 +0200
committerPaul B Mahol <onemda@gmail.com>2018-09-15 21:59:01 +0200
commit11fc18994e8dcc84966e88c28fc9a43e3087521f (patch)
tree724a38c3ff4896bf42c56f6b3b7cad17aba93431 /libavfilter
parente334765408d016801db7580498d82b0555ff5aec (diff)
avfilter/f_ebur128: check return value of ff_insert_outpad()
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/f_ebur128.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c
index 1e8b90fa2f..a48d3629ce 100644
--- a/libavfilter/f_ebur128.c
+++ b/libavfilter/f_ebur128.c
@@ -459,6 +459,7 @@ static av_cold int init(AVFilterContext *ctx)
{
EBUR128Context *ebur128 = ctx->priv;
AVFilterPad pad;
+ int ret;
if (ebur128->loglevel != AV_LOG_INFO &&
ebur128->loglevel != AV_LOG_VERBOSE) {
@@ -495,7 +496,11 @@ static av_cold int init(AVFilterContext *ctx)
};
if (!pad.name)
return AVERROR(ENOMEM);
- ff_insert_outpad(ctx, 0, &pad);
+ ret = ff_insert_outpad(ctx, 0, &pad);
+ if (ret < 0) {
+ av_freep(&pad.name);
+ return ret;
+ }
}
pad = (AVFilterPad){
.name = av_asprintf("out%d", ebur128->do_video),
@@ -504,7 +509,11 @@ static av_cold int init(AVFilterContext *ctx)
};
if (!pad.name)
return AVERROR(ENOMEM);
- ff_insert_outpad(ctx, ebur128->do_video, &pad);
+ ret = ff_insert_outpad(ctx, ebur128->do_video, &pad);
+ if (ret < 0) {
+ av_freep(&pad.name);
+ return ret;
+ }
/* summary */
av_log(ctx, AV_LOG_VERBOSE, "EBU +%d scale\n", ebur128->meter);