mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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 2e67a99fbc
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e80a4ce69f
commit
c6e3682a0c
@ -1210,7 +1210,9 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame,
|
|||||||
dummy.code = code;
|
dummy.code = code;
|
||||||
glyph = av_tree_find(s->glyphs, &dummy, glyph_cmp, NULL);
|
glyph = av_tree_find(s->glyphs, &dummy, glyph_cmp, NULL);
|
||||||
if (!glyph) {
|
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);
|
y_min = FFMIN(glyph->bbox.yMin, y_min);
|
||||||
|
Loading…
Reference in New Issue
Block a user