av_sub: Support clearing subtitles

Makes PGS subtitles disappear at the appropriate time.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32651 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-11-27 10:01:11 +00:00 committed by Uoti Urpala
parent 04a3a3825f
commit bb4cca9b32
1 changed files with 2 additions and 0 deletions

View File

@ -83,6 +83,8 @@ int decode_avsub(struct sh_sub *sh, uint8_t **data, int *size,
*endpts = *pts + sub.end_display_time / 1000.0;
*pts += sub.start_display_time / 1000.0;
}
if (got_sub && vo_spudec && sub.num_rects == 0)
spudec_set_paletted(vo_spudec, NULL, 0, NULL, 0, 0, 0, 0, *pts, *endpts);
if (got_sub && sub.num_rects > 0) {
switch (sub.rects[0]->type) {
case SUBTITLE_BITMAP: