Mercurial > mplayer.hg
diff mpcommon.c @ 29768:fa5a020677d6
Unbreak the demuxer-specific code in video.c with e.g.
-audiofile by moving the code to manually interleave
subtitles to mp_common.c.
video.c should still be changed to not be demuxer-specific
anymore, it is bad practice but fully fixing it is non-trivial.
author | reimar |
---|---|
date | Sun, 01 Nov 2009 09:48:34 +0000 |
parents | 1cc8a20520e8 |
children | a5e7590ffdbd |
line wrap: on
line diff
--- a/mpcommon.c Sat Oct 31 15:34:18 2009 +0000 +++ b/mpcommon.c Sun Nov 01 09:48:34 2009 +0000 @@ -145,6 +145,8 @@ } else if (dvdsub_id >= 0 && (type == 't' || type == 'm' || type == 'a')) { double curpts = refpts + sub_delay; double endpts; + if (d_dvdsub->non_interleaved) + ds_get_next_pts(d_dvdsub); while (d_dvdsub->first) { double subpts = ds_get_next_pts(d_dvdsub); if (subpts > curpts) @@ -195,6 +197,8 @@ sub_add_text(&subs, packet, len, endpts); set_osd_subtitle(&subs); } + if (d_dvdsub->non_interleaved) + ds_get_next_pts(d_dvdsub); } if (sub_clear_text(&subs, curpts)) set_osd_subtitle(&subs);