summaryrefslogtreecommitdiffstats
path: root/mpcommon.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-01 09:48:34 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-11-01 09:48:34 +0000
commit1280614c9f3dd85ba1fa2f19f0b4d40f011bb8ee (patch)
tree3231aa2fa32d38100e90c914926671c396d5ba4b /mpcommon.c
parente9942166df28c0ae14566eab9d7a7e6011faafab (diff)
downloadmpv-1280614c9f3dd85ba1fa2f19f0b4d40f011bb8ee.tar.bz2
mpv-1280614c9f3dd85ba1fa2f19f0b4d40f011bb8ee.tar.xz
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29810 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mpcommon.c')
-rw-r--r--mpcommon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mpcommon.c b/mpcommon.c
index 442fba9560..ed0c11e725 100644
--- a/mpcommon.c
+++ b/mpcommon.c
@@ -145,6 +145,8 @@ void update_subtitles(sh_video_t *sh_video, double refpts, demux_stream_t *d_dvd
} 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 @@ void update_subtitles(sh_video_t *sh_video, double refpts, demux_stream_t *d_dvd
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);