]> granicus.if.org Git - libass/commitdiff
Reset clipping mode on every rectangle \clip
authorOleg Oshmyan <chortos@inbox.lv>
Thu, 1 May 2014 01:38:33 +0000 (02:38 +0100)
committerOleg Oshmyan <chortos@inbox.lv>
Mon, 12 May 2014 01:24:07 +0000 (02:24 +0100)
Prior to this fix, both of the following:
    \iclip(0,0,9999,9999)\clip(0,0,9999,9999)
    \iclip(0,0,0,0)\clip(0,0,9999,9999)
hid the whole picture in libass. The correct behavior
in both cases is to display the whole picture.

libass/ass_parse.c

index b8c2547698972826a838e6d49f28c4abc81d1698..61479e7f085ae70603706e33734429be0428a40f 100644 (file)
@@ -663,6 +663,7 @@ char *parse_tag(ASS_Renderer *render_priv, char *p, double pwr)
                 render_priv->state.clip_y0 * (1 - pwr) + y0 * pwr;
             render_priv->state.clip_y1 =
                 render_priv->state.clip_y1 * (1 - pwr) + y1 * pwr;
+            render_priv->state.clip_mode = 0;
         // Might be a vector clip
         } else if (!render_priv->state.clip_drawing) {
             p = parse_vector_clip(render_priv, start);