diff options
author | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-11-25 12:32:41 +0200 |
---|---|---|
committer | Petri Hintukainen <phintuka@users.sourceforge.net> | 2011-11-25 12:32:41 +0200 |
commit | 364abb8eb2ea8fecc6fbbe2fe2cdd6c3fc2cf204 (patch) | |
tree | f2f241fe60fcdeb3cfbeb4c902cf0fa15f08792f /src | |
parent | 2b00fb6cedea5e6a72777210eb20bc34a7a3893b (diff) | |
download | xine-lib-364abb8eb2ea8fecc6fbbe2fe2cdd6c3fc2cf204.tar.gz xine-lib-364abb8eb2ea8fecc6fbbe2fe2cdd6c3fc2cf204.tar.bz2 |
demux_ts: check if input plugin supports track languages when track language is unknown in demuxer
--HG--
branch : point-release
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_ts.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index b6f11c91f..084782f72 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -2348,10 +2348,14 @@ static int demux_ts_get_optional_data(demux_plugin_t *this_gen, { case DEMUX_OPTIONAL_DATA_AUDIOLANG: if ((channel >= 0) && (channel < this->audio_tracks_count)) { - if (this->audio_tracks[channel].lang[0]) + if (this->audio_tracks[channel].lang[0]) { strcpy(str, this->audio_tracks[channel].lang); - else + } else { + /* input plugin may know the language */ + if (this->input->get_capabilities(this->input) & INPUT_CAP_AUDIOLANG) + return DEMUX_OPTIONAL_UNSUPPORTED; sprintf(str, "%3i", channel); + } } else { strcpy(str, "none"); @@ -2363,6 +2367,9 @@ static int demux_ts_get_optional_data(demux_plugin_t *this_gen, if (this->spu_langs[channel].desc.lang[0]) { strcpy(str, this->spu_langs[channel].desc.lang); } else { + /* input plugin may know the language */ + if (this->input->get_capabilities(this->input) & INPUT_CAP_SPULANG) + return DEMUX_OPTIONAL_UNSUPPORTED; sprintf(str, "%3i", channel); } } else { |