summaryrefslogtreecommitdiff
path: root/src/xine-engine/xine.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r--src/xine-engine/xine.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index afb982ed5..7028f8fa0 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.228 2003/02/06 00:09:20 miguelfreitas Exp $
+ * $Id: xine.c,v 1.229 2003/02/13 16:24:28 mroi Exp $
*
* top-level xine functions
*
@@ -1312,9 +1312,11 @@ int xine_get_spu_lang (xine_stream_t *stream, int channel, char *lang) {
**/
if (stream->demux_plugin) {
if (stream->demux_plugin->get_capabilities (stream->demux_plugin) & DEMUX_CAP_SPULANG) {
- stream->demux_plugin->get_optional_data (stream->demux_plugin, lang,
- DEMUX_OPTIONAL_DATA_SPULANG);
- return 1;
+ /* pass the channel number to the plugin in the data field */
+ *((int *)lang) = channel;
+ if (stream->demux_plugin->get_optional_data (stream->demux_plugin, lang,
+ DEMUX_OPTIONAL_DATA_SPULANG) == DEMUX_OPTIONAL_SUCCESS)
+ return 1;
}
}
@@ -1323,9 +1325,11 @@ int xine_get_spu_lang (xine_stream_t *stream, int channel, char *lang) {
**/
if (stream->input_plugin) {
if (stream->input_plugin->get_capabilities (stream->input_plugin) & INPUT_CAP_SPULANG) {
- stream->input_plugin->get_optional_data (stream->input_plugin, lang,
- INPUT_OPTIONAL_DATA_SPULANG);
- return 1;
+ /* pass the channel number to the plugin in the data field */
+ *((int *)lang) = channel;
+ if (stream->input_plugin->get_optional_data (stream->input_plugin, lang,
+ INPUT_OPTIONAL_DATA_SPULANG) == INPUT_OPTIONAL_SUCCESS)
+ return 1;
}
}
@@ -1336,17 +1340,21 @@ int xine_get_audio_lang (xine_stream_t *stream, int channel, char *lang) {
if (stream->demux_plugin) {
if (stream->demux_plugin->get_capabilities (stream->demux_plugin) & DEMUX_CAP_AUDIOLANG) {
- stream->demux_plugin->get_optional_data (stream->demux_plugin, lang,
- DEMUX_OPTIONAL_DATA_AUDIOLANG);
- return 1;
+ /* pass the channel number to the plugin in the data field */
+ *((int *)lang) = channel;
+ if (stream->demux_plugin->get_optional_data (stream->demux_plugin, lang,
+ DEMUX_OPTIONAL_DATA_AUDIOLANG) == DEMUX_OPTIONAL_SUCCESS)
+ return 1;
}
}
if (stream->input_plugin) {
if (stream->input_plugin->get_capabilities (stream->input_plugin) & INPUT_CAP_AUDIOLANG) {
- stream->input_plugin->get_optional_data (stream->input_plugin, lang,
- INPUT_OPTIONAL_DATA_AUDIOLANG);
- return 1;
+ /* pass the channel number to the plugin in the data field */
+ *((int *)lang) = channel;
+ if (stream->input_plugin->get_optional_data (stream->input_plugin, lang,
+ INPUT_OPTIONAL_DATA_AUDIOLANG) == INPUT_OPTIONAL_SUCCESS)
+ return 1;
}
}