]> granicus.if.org Git - libass/commitdiff
Prevent selective style overrides with scrolling
authorwm4 <wm4@nowhere>
Fri, 6 Mar 2015 12:15:13 +0000 (13:15 +0100)
committerwm4 <wm4@nowhere>
Fri, 6 Mar 2015 12:15:13 +0000 (13:15 +0100)
Similar to xy-VSFilter.

libass/ass_render.c

index 4774dabf51a9c1a9c7c7c50049ea031542df6566..db85586429b9bb4d00a400c509da2d22ec7f7249 100644 (file)
@@ -756,7 +756,8 @@ static ASS_Style *handle_selective_style_overrides(ASS_Renderer *render_priv,
     // The user style was set with ass_set_selective_style_override().
     ASS_Style *user = &render_priv->user_override_style;
     ASS_Style *new = &render_priv->state.override_style_temp_storage;
-    int explicit = event_has_hard_overrides(render_priv->state.event->Text);
+    int explicit = event_has_hard_overrides(render_priv->state.event->Text) ||
+                   render_priv->state.evt_type != EVENT_NORMAL;
     int requested = render_priv->settings.selective_style_overrides;
     double scale;
 
@@ -925,11 +926,11 @@ init_render_context(ASS_Renderer *render_priv, ASS_Event *event)
     render_priv->state.event = event;
     render_priv->state.parsed_tags = 0;
     render_priv->state.has_clips = 0;
+    render_priv->state.evt_type = EVENT_NORMAL;
 
     reset_render_context(render_priv, NULL);
     render_priv->state.wrap_style = render_priv->track->WrapStyle;
 
-    render_priv->state.evt_type = EVENT_NORMAL;
     render_priv->state.alignment = render_priv->state.style->Alignment;
     render_priv->state.pos_x = 0;
     render_priv->state.pos_y = 0;