summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorIvan Efimov <ioefimov@gmail.com>2015-04-10 17:28:45 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-04-14 12:04:52 +0200
commit2051b401cc7e9ec9051c7f575d639944a9869b67 (patch)
tree3933c84ae492e7e773c52c0805da04b8f03828ec /libavfilter
parent013498ba15ae15e7cd0353dec97fe92ddc8dbdfc (diff)
downloadffmpeg-streaming-2051b401cc7e9ec9051c7f575d639944a9869b67.zip
ffmpeg-streaming-2051b401cc7e9ec9051c7f575d639944a9869b67.tar.gz
avfilter/drawtext: fix frame mem leak
Signed-off-by: Ivan Efimov <ioefimov@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_drawtext.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index 37eb231..cf17a55 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -1275,12 +1275,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
int ret;
if (s->reload) {
- if ((ret = load_textfile(ctx)) < 0)
+ if ((ret = load_textfile(ctx)) < 0) {
+ av_frame_free(&frame);
return ret;
+ }
#if CONFIG_LIBFRIBIDI
if (s->text_shaping)
- if ((ret = shape_text(ctx)) < 0)
+ if ((ret = shape_text(ctx)) < 0) {
+ av_frame_free(&frame);
return ret;
+ }
#endif
}
OpenPOWER on IntegriCloud