[FFmpeg-cvslog] avfilter/copy: add forgotten check
Paul B Mahol
git at videolan.org
Tue Oct 1 15:59:13 EEST 2019
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Oct 1 14:55:43 2019 +0200| [94b155e49bdefcfe3117759e55bb1d40e655eb9e] | committer: Paul B Mahol
avfilter/copy: add forgotten check
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=94b155e49bdefcfe3117759e55bb1d40e655eb9e
---
libavfilter/af_acopy.c | 4 +++-
libavfilter/vf_copy.c | 4 +++-
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)
More information about the ffmpeg-cvslog
mailing list