From: Grigori Goronzy Date: Mon, 1 Oct 2012 17:33:36 +0000 (+0200) Subject: Fix change detection in a rare case X-Git-Tag: 0.10.1~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=362614163207ed0cf775e591d4ded17a3170d33e;p=libass Fix change detection in a rare case If an empty track is passed to ass_render_frame, always set the change detection value to 2 (content and positions changed). This is acceptable in both the case that the previous call resulted in images (obviously) and in the case that the previous call resulted in no images (in that case the change detection result doesn't actually matter). --- diff --git a/libass/ass_render.c b/libass/ass_render.c index b11c681..980dac3 100644 --- a/libass/ass_render.c +++ b/libass/ass_render.c @@ -2525,8 +2525,12 @@ ASS_Image *ass_render_frame(ASS_Renderer *priv, ASS_Track *track, // init frame rc = ass_start_frame(priv, track, now); - if (rc != 0) + if (rc != 0) { + if (detect_change) { + *detect_change = 2; + } return 0; + } // render events separately cnt = 0;