drawtext: add missing braces around an if() block.
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>
Sat, 4 Feb 2012 22:14:15 +0000 (00:14 +0200)
committerAnton Khirnov <anton@khirnov.net>
Sun, 5 Feb 2012 07:07:55 +0000 (08:07 +0100)
Prevents uninitialized read.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavfilter/vf_drawtext.c

index dcde542..c5a6ffe 100644 (file)
@@ -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);