Commit 2e67a99f authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/vf_drawtext: Check return code of load_glyph()

Fixes segfault
Fixes Ticket5347
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 64ae08ff
......@@ -1224,7 +1224,9 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame,
dummy.code = code;
glyph = av_tree_find(s->glyphs, &dummy, glyph_cmp, NULL);
if (!glyph) {
load_glyph(ctx, &glyph, code);
ret = load_glyph(ctx, &glyph, code);
if (ret < 0)
return ret;
}
y_min = FFMIN(glyph->bbox.yMin, y_min);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment