Fix change detection when cache is cleared
commit20f83b10241aa9c67c3a7e0c1a7e4d986fe199f1
authorwm4 <wm4@nowhere>
Sat, 29 Sep 2012 22:45:59 +0000 (30 00:45 +0200)
committerGrigori Goronzy <greg@blackbox>
Mon, 1 Oct 2012 13:41:33 +0000 (1 15:41 +0200)
tree654b9357a13e7b6959f5f9483af15e6c9dd66620
parent0594b9fcb5952448dee7eaa3646f7b1281ae8f80
Fix change detection when cache is cleared

check_cache_limits() clears the image list. If all subtitles disappear
right in the frame the cache has been cleared, ass_detect_change() will
see two empty image lists (old - not empty, but cleared, new - empty),
and signal to the application that there was no change. As result,
media players which rely on the change detection will keep displaying
the last subtitle until the next subtitle event.

This bug was found by uau and has been reported on IRC in February.
libass/ass_render.c
libass/ass_render.h