]> granicus.if.org Git - libass/commitdiff
Raise max. number of \be applications to 100, introduce #define for it.
authorgreg <greg@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 6 Mar 2009 09:20:09 +0000 (09:20 +0000)
committergreg <greg@b3059339-0415-0410-9bf9-f77b7e298cf2>
Fri, 6 Mar 2009 09:20:09 +0000 (09:20 +0000)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28836 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_render.c

index 0524e027b89010ca3430505e758a5ddadce0da46..7263413963b943209d77e17a46a3646e6611e291 100644 (file)
@@ -44,6 +44,7 @@
 #define MAX_GLYPHS 3000
 #define MAX_LINES 300
 #define BLUR_MAX_RADIUS 50.0
+#define MAX_BE 100
 #define ROUND(x) ((int) ((x) + .5))
 #define SUBPIXEL_MASK 56       // d6 bitmask for subpixel accuracy adjustment
 
@@ -1158,9 +1159,9 @@ static char* parse_tag(char* p, double pwr) {
        } else if (mystrcmp(&p, "be")) {
                int val;
                if (mystrtoi(&p, &val)) {
-                       // Clamp to 10, since high values need excessive CPU
+                       // Clamp to a safe upper limit, since high values need excessive CPU
                        val = (val < 0) ? 0 : val;
-                       val = (val > 10) ? 10 : val;
+                       val = (val > MAX_BE) ? MAX_BE : val;
                        render_context.be = val;
                } else
                        render_context.be = 0;