summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2012-10-01 19:33:36 +0200
committerGrigori Goronzy <greg@blackbox>2012-10-01 19:33:36 +0200
commit362614163207ed0cf775e591d4ded17a3170d33e (patch)
treef5ac4498a1c6b3e4f9d27aa2c183b7fe3ab0c569
parent840ce4c2d9381e340c3239d104933fea85fff3e5 (diff)
downloadlibass-362614163207ed0cf775e591d4ded17a3170d33e.tar.bz2
libass-362614163207ed0cf775e591d4ded17a3170d33e.tar.xz
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).
-rw-r--r--libass/ass_render.c6
1 files changed, 5 insertions, 1 deletions
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;