summaryrefslogtreecommitdiff
path: root/libavfilter/vf_zoompan.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-12 19:59:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-13 01:58:45 +0200
commit00f5c8f98de69abbcb5b2ca94b91efd9b22dfe36 (patch)
treee663d89a1d05674428eaa64dc9afa5bb4e3dd557 /libavfilter/vf_zoompan.c
parent93b0ee21a2f534f6d3b812686f3acde110e94f18 (diff)
downloadffmpeg-00f5c8f98de69abbcb5b2ca94b91efd9b22dfe36.tar.gz
avfilter/vf_zoompan: free out AVFrame on failure
Fixes: CID1197065 Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_zoompan.c')
-rw-r--r--libavfilter/vf_zoompan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c
index d1268513ca..c49193a065 100644
--- a/libavfilter/vf_zoompan.c
+++ b/libavfilter/vf_zoompan.c
@@ -127,7 +127,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
ZPContext *s = ctx->priv;
double var_values[VARS_NB], nb_frames, zoom, dx, dy;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(in->format);
- AVFrame *out;
+ AVFrame *out = NULL;
int i, k, x, y, w, h, ret = 0;
var_values[VAR_IN_W] = var_values[VAR_IW] = in->width;
@@ -232,6 +232,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
ret = ff_filter_frame(outlink, out);
if (ret < 0)
break;
+ out = NULL;
sws_freeContext(s->sws);
s->sws = NULL;
@@ -245,6 +246,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
fail:
sws_freeContext(s->sws);
s->sws = NULL;
+ av_frame_free(&out);
av_frame_free(&in);
return ret;
}