diff options
author | phintuka <phintuka> | 2009-03-30 12:20:38 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2009-03-30 12:20:38 +0000 |
commit | 72f06c51994b13d212b5710f8b498e8822dc3fa3 (patch) | |
tree | a87d36a226f7b7034698ea643011e5b3781ad918 | |
parent | bc0451158a620f3b7866bb8d6fafbc05fa998a67 (diff) | |
download | xineliboutput-72f06c51994b13d212b5710f8b498e8822dc3fa3.tar.gz xineliboutput-72f06c51994b13d212b5710f8b498e8822dc3fa3.tar.bz2 |
Fixed automatic SPU language selection for non-DVD media types
-rw-r--r-- | xine_input_vdr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xine_input_vdr.c b/xine_input_vdr.c index 9f05862e..c1670244 100644 --- a/xine_input_vdr.c +++ b/xine_input_vdr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_input_vdr.c,v 1.246 2009-03-17 20:03:30 rofafor Exp $ + * $Id: xine_input_vdr.c,v 1.247 2009-03-30 12:20:38 phintuka Exp $ * */ @@ -2863,6 +2863,12 @@ static int vdr_plugin_parse_control(vdr_input_plugin_if_t *this_if, const char * int max_ch = xine_get_stream_info(stream, XINE_STREAM_INFO_MAX_SPU_CHANNEL); int ch = old_ch; int ch_auto = strstr(cmd+10, "auto") ? 1 : 0; + int is_dvd = 0; + + if (this->slave_stream && this->slave_stream->input_plugin) { + const char *mrl = this->slave_stream->input_plugin->get_mrl(this->slave_stream->input_plugin); + is_dvd = !strncmp(mrl, "dvd:/", 5); + } if(strstr(cmd+10, "NEXT")) ch = ch < max_ch ? ch+1 : -2; @@ -2884,7 +2890,7 @@ static int vdr_plugin_parse_control(vdr_input_plugin_if_t *this_if, const char * old_ch = stream->spu_channel_auto; if (ch != old_ch) { - if (ch_auto && stream->spu_channel_user == SPU_CHANNEL_AUTO) { + if (is_dvd && ch_auto && stream->spu_channel_user == SPU_CHANNEL_AUTO) { LOGDBG("Automatic SPU channel %d->%d ignored", old_ch, ch); } else { LOGDBG("Forced SPU channel %d->%d", old_ch, ch); |