From 362614163207ed0cf775e591d4ded17a3170d33e Mon Sep 17 00:00:00 2001 From: Grigori Goronzy Date: Mon, 1 Oct 2012 19:33:36 +0200 Subject: 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). --- libass/ass_render.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3