aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol2019-10-01 14:55:43 +0200
committerPaul B Mahol2019-10-01 14:55:43 +0200
commit94b155e49bdefcfe3117759e55bb1d40e655eb9e (patch)
tree4d849c1e5e8dcbc4c65478998b3f3494f836417f
parent9cee8975c3fe49c22ce450863d195a462e2be06a (diff)
avfilter/copy: add forgotten check
-rw-r--r--libavfilter/af_acopy.c4
-rw-r--r--libavfilter/vf_copy.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/af_acopy.c b/libavfilter/af_acopy.c
index a7caec6ae9..2d915019db 100644
--- a/libavfilter/af_acopy.c
+++ b/libavfilter/af_acopy.c
@@ -26,8 +26,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFrame *out = ff_get_audio_buffer(outlink, in->nb_samples);
int ret;
- if (!out)
+ if (!out) {
ret = AVERROR(ENOMEM);
+ goto fail;
+ }
ret = av_frame_copy_props(out, in);
if (ret < 0)
diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c
index a59e024e87..e82feb4f0e 100644
--- a/libavfilter/vf_copy.c
+++ b/libavfilter/vf_copy.c
@@ -50,8 +50,10 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
AVFrame *out = ff_get_video_buffer(outlink, in->width, in->height);
int ret;
- if (!out)
+ if (!out) {
ret = AVERROR(ENOMEM);
+ goto fail;
+ }
ret = av_frame_copy_props(out, in);
if (ret < 0)