[FFmpeg-cvslog] drawtext: add missing braces around an if() block.
Andrey Utkin
git at videolan.org
Tue Feb 7 02:02:58 CET 2012
ffmpeg | branch: master | Andrey Utkin <andrey.krieger.utkin at gmail.com> | Sun Feb 5 00:14:15 2012 +0200| [e7f0bc8c0f1c4a8731eb1c33cb013296a0555538] | committer: Anton Khirnov
drawtext: add missing braces around an if() block.
Prevents uninitialized read.
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e7f0bc8c0f1c4a8731eb1c33cb013296a0555538
---
libavfilter/vf_drawtext.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index dcde542..c5a6ffe 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -492,9 +492,11 @@ static int dtext_prepare_text(AVFilterContext *ctx)
/* get glyph */
dummy.code = code;
glyph = av_tree_find(dtext->glyphs, &dummy, glyph_cmp, NULL);
- if (!glyph)
+ if (!glyph) {
ret = load_glyph(ctx, &glyph, code);
- if (ret) return ret;
+ if (ret)
+ return ret;
+ }
y_min = FFMIN(glyph->bbox.yMin, y_min);
y_max = FFMAX(glyph->bbox.yMax, y_max);
More information about the ffmpeg-cvslog
mailing list