avfilter/vf_drawtext: Check return code of load_glyph()
Fixes segfault Fixes Ticket5347 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 2e67a99fbc6b99315925de40fc6fa7161576be10) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
512c064cd9
commit
f2e9e4757f
@ -1222,7 +1222,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user