summaryrefslogtreecommitdiffstats
path: root/mpcommon.c
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-11 21:45:20 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-11 21:45:20 +0000
commit0d36212f39d5be3963ffd22a950612e368e1cf54 (patch)
tree1f4b529b15c78484d831275592aaa1ddc2a2742c /mpcommon.c
parentbdb6a07d2a712c752cc7f04dd0afd5950e4607f7 (diff)
downloadmpv-0d36212f39d5be3963ffd22a950612e368e1cf54.tar.bz2
mpv-0d36212f39d5be3963ffd22a950612e368e1cf54.tar.xz
Remove global_ass_track. Instead create an ass_track for each 't' track.
Global_ass_track obviously can not work when there is more than one 't tracks, their lines will be mixed up. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25684 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mpcommon.c')
-rw-r--r--mpcommon.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mpcommon.c b/mpcommon.c
index 2bc3d39aeb..1d1578c4e1 100644
--- a/mpcommon.c
+++ b/mpcommon.c
@@ -120,11 +120,10 @@ void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset)
continue;
}
if (type == 't' && ass_enabled) { // plaintext subs with libass
- static ass_track_t *global_ass_track = NULL;
- if (!global_ass_track) global_ass_track = ass_default_track(ass_library);
- ass_track = global_ass_track;
+ sh_sub_t* sh = d_dvdsub->sh;
+ ass_track = sh ? sh->ass_track : NULL;
vo_sub = NULL;
- if (pts != MP_NOPTS_VALUE) {
+ if (ass_track && pts != MP_NOPTS_VALUE) {
if (endpts == MP_NOPTS_VALUE) endpts = pts + 3;
sub_clear_text(&subs, MP_NOPTS_VALUE);
sub_add_text(&subs, packet, len, endpts);