Mercurial > mplayer.hg
changeset 25509:1cfa39a320cc
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.
author | eugeni |
---|---|
date | Fri, 28 Dec 2007 20:57:38 +0000 |
parents | 99d2b06cbdc7 |
children | c0e1528c7432 |
files | mpcommon.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mpcommon.c Fri Dec 28 18:56:50 2007 +0000 +++ b/mpcommon.c Fri Dec 28 20:57:38 2007 +0000 @@ -28,7 +28,7 @@ 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 @@ } // 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);