Fixes this test case:
Dialogue: 0,0:00:00.00,0:00:02.00,,,0,0,0,,{\fs50\pos(250,250)\iclip(m 0 0 l 400 0 l 400 220 l0 220)}Hello
Dialogue: 0,0:00:02.00,0:10:00.00,,,0,0,0,,{\fs50\pos(250,250)\iclip(m 0 0 l 400 0 l 400 230 l0 230)}Hello
The problem here is that the rendered output bitmap list itself does
not change, only its contents (due to the different vector clip).
ass_render_frame() will not set *detect_change correctly, and an
application using this flag (like mplayer or mpv) will not update
the screen as needed.
Fix this with a very cheap hack: always report a full change if
there's a vector clip. This is basically an emergency fix until
we have a proper way to detect the change.
int aleft, atop, bleft, btop;
unsigned char *abuffer, *bbuffer, *nbuffer;
+ render_priv->state.has_vector_clip = 1;
+
abuffer = cur->bitmap;
bbuffer = clip_bm->buffer;
ax = cur->dst_x;
render_priv->state.event = event;
render_priv->state.style = render_priv->track->styles + event->Style;
render_priv->state.parsed_tags = 0;
+ render_priv->state.has_vector_clip = 0;
reset_render_context(render_priv, render_priv->state.style);
render_priv->state.wrap_style = render_priv->track->WrapStyle;
ASS_Image *img, *img2;
int diff;
- if (priv->cache_cleared)
+ if (priv->cache_cleared || priv->state.has_vector_clip)
return 2;
img = priv->prev_images_root;
ASS_Event *event;
ASS_Style *style;
int parsed_tags;
+ int has_vector_clip;
ASS_Font *font;
double font_size;