diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-04 00:07:43 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-04 00:07:43 +0300 |
commit | d5710411c74357efce09d1b09770990d2c13ef0c (patch) | |
tree | 2192f3142ffe584693e9daeae4e1083640fa2cf4 /libavfilter/vf_atadenoise.c | |
parent | c97ea011f57f7a42f249ff5c1d4d7b21c43dc104 (diff) |
avfilter/vf_atadenoise: Check for ff_get_video_buffer() failure
Fixes CID1322338
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavfilter/vf_atadenoise.c')
-rwxr-xr-x | libavfilter/vf_atadenoise.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c index 5e60687c29..a3c623f6ff 100755 --- a/libavfilter/vf_atadenoise.c +++ b/libavfilter/vf_atadenoise.c @@ -302,6 +302,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *buf) if (s->q.available != s->size) { if (s->q.available < s->mid) { out = ff_get_video_buffer(outlink, outlink->w, outlink->h); + if (!out) + return AVERROR(ENOMEM); + for (i = 0; i < s->mid; i++) ff_bufqueue_add(ctx, &s->q, av_frame_clone(out)); av_frame_free(&out); |