avfilter/drawtext: fix frame mem leak

Signed-off-by: Ivan Efimov <ioefimov@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Ivan Efimov 2015-04-10 17:28:45 +03:00 committed by Michael Niedermayer
parent 013498ba15
commit 2051b401cc
1 changed files with 6 additions and 2 deletions

View File

@ -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
}