# HG changeset patch # User eugeni # Date 1198875458 0 # Node ID 1cfa39a320ccf52cdf9ab74f1164ed31b3344f86 # Parent 99d2b06cbdc7cdd397b5b7c72f73f2c923edbf1a 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. diff -r 99d2b06cbdc7 -r 1cfa39a320cc mpcommon.c --- 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);