Browse Source

avfilter/vf_drawtext: Check return code of load_glyph()

Fixes segfault
Fixes Ticket5347

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.1
Michael Niedermayer 9 years ago
parent
commit
2e67a99fbc
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavfilter/vf_drawtext.c

+ 3
- 1
libavfilter/vf_drawtext.c View File

@@ -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);


Loading…
Cancel
Save