summaryrefslogtreecommitdiff
path: root/libavfilter/vf_drawtext.c
diff options
context:
space:
mode:
authorClément Bœsch <clement@stupeflix.com>2015-12-21 15:54:20 +0100
committerClément Bœsch <clement@stupeflix.com>2015-12-21 15:54:20 +0100
commit4cb26c3c354e3dc0adcd5d69a4c1bcf1246d15d9 (patch)
tree164f53b0b27352c6f4942393d97fd5e91119caff /libavfilter/vf_drawtext.c
parenta142308dcdc3eae82bedfe48dc119ff7d0679d09 (diff)
downloadffmpeg-4cb26c3c354e3dc0adcd5d69a4c1bcf1246d15d9.tar.gz
lavfi/drawtext: fix crash when no text, file or timecode provided
Diffstat (limited to 'libavfilter/vf_drawtext.c')
-rw-r--r--libavfilter/vf_drawtext.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index fc77be4e9c..beec018f46 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -610,12 +610,6 @@ static av_cold int init(AVFilterContext *ctx)
return err;
}
-#if CONFIG_LIBFRIBIDI
- if (s->text_shaping)
- if ((err = shape_text(ctx)) < 0)
- return err;
-#endif
-
if (s->reload && !s->textfile)
av_log(ctx, AV_LOG_WARNING, "No file to reload\n");
@@ -636,6 +630,12 @@ static av_cold int init(AVFilterContext *ctx)
return AVERROR(EINVAL);
}
+#if CONFIG_LIBFRIBIDI
+ if (s->text_shaping)
+ if ((err = shape_text(ctx)) < 0)
+ return err;
+#endif
+
if ((err = FT_Init_FreeType(&(s->library)))) {
av_log(ctx, AV_LOG_ERROR,
"Could not load FreeType: %s\n", FT_ERRMSG(err));