diff options
author | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-28 20:57:38 +0000 |
---|---|---|
committer | eugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-12-28 20:57:38 +0000 |
commit | 0df97d663bd0371420b56b583b1b1a2f6c80a019 (patch) | |
tree | c280517603e80291597c4d07f40af735237d1a0f /mpcommon.c | |
parent | 044877177548a1bbf58afccdcbd450d288e6f068 (diff) | |
download | mpv-0df97d663bd0371420b56b583b1b1a2f6c80a019.tar.bz2 mpv-0df97d663bd0371420b56b583b1b1a2f6c80a019.tar.xz |
Fix update_subtitles() checking subtitle type for the wrong track.
update_subtitles() uses 'type' field from d_dvdsub even when some other track
is active. For this reason, external vobsub is not displayed when there is at
least one text track from demuxer (type is always 't' or 'a' in this case).
The solution is to check vobsub_id and dvdsub_id instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25537 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mpcommon.c')
-rw-r--r-- | mpcommon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mpcommon.c b/mpcommon.c index fb99f7e4ab..ffbc2b2f4e 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -28,7 +28,7 @@ void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) int len; char type = d_dvdsub->sh ? ((sh_sub_t *)d_dvdsub->sh)->type : 'v'; static subtitle subs; - if (type == 'a') + if (dvdsub_id >= 0 && type == 'a') #ifdef USE_ASS if (!ass_enabled) #endif @@ -59,7 +59,8 @@ void update_subtitles(sh_video_t *sh_video, demux_stream_t *d_dvdsub, int reset) } // DVD sub: - if (vo_config_count && vo_spudec && type == 'v') { + if (vo_config_count && vo_spudec && + (vobsub_id >= 0 || (dvdsub_id >= 0 && type == 'v'))) { int timestamp; current_module = "spudec"; spudec_heartbeat(vo_spudec, 90000*sh_video->timer); |