]> granicus.if.org Git - libass/commitdiff
Always use the new style with \r and style overrides
authorwm4 <wm4@nowhere>
Thu, 26 Feb 2015 19:49:10 +0000 (20:49 +0100)
committerwm4 <wm4@nowhere>
Thu, 26 Feb 2015 19:49:10 +0000 (20:49 +0100)
I don't know why it was done this way, but some fields were always taken
from the event's style, instead of the (possibly different) \r style.
Undo this, as it seems like an unnecessary complication.

libass/ass_render.c

index 614078800621a78b2892e6f739896c5d71b6461f..2a366478075594253f0035396fb136e65cb001e1 100644 (file)
@@ -782,12 +782,12 @@ static ASS_Style *handle_selective_style_overrides(ASS_Renderer *render_priv,
     new->Underline = rstyle->Underline;
     new->Angle = rstyle->Angle;
 
-    new->MarginL = script->MarginL;
-    new->MarginR = script->MarginR;
-    new->MarginV = script->MarginV;
-    new->Alignment = script->Alignment;
-    new->Encoding = script->Encoding;
-    new->treat_fontname_as_pattern = script->treat_fontname_as_pattern;
+    new->MarginL = rstyle->MarginL;
+    new->MarginR = rstyle->MarginR;
+    new->MarginV = rstyle->MarginV;
+    new->Alignment = rstyle->Alignment;
+    new->Encoding = rstyle->Encoding;
+    new->treat_fontname_as_pattern = rstyle->treat_fontname_as_pattern;
 
     // The user style is supposed to be independent of the script resolution.
     // Treat the user style's values as if they were specified for a script with