diff options
author | Christophe Thommeret <hftom@free.fr> | 2007-08-17 19:42:22 +0100 |
---|---|---|
committer | Christophe Thommeret <hftom@free.fr> | 2007-08-17 19:42:22 +0100 |
commit | a875b2f17a011350d2284003170efdab94741e6d (patch) | |
tree | 81cac75febeafe4effb86094c194104db45e4c4f | |
parent | f6d9b0ac9567cbb6fdba08b20c9528770bef4696 (diff) | |
download | xine-lib-a875b2f17a011350d2284003170efdab94741e6d.tar.gz xine-lib-a875b2f17a011350d2284003170efdab94741e6d.tar.bz2 |
xine_stream audio_track_map order fix
Actually, audio_decoder_loop stores audio streams in ascending buffer type
order. So, for example a stream with buffer type BUF_AUDIO_A52|channel_num
will always be stored in audio_track_map array before any mpegaudio stream.
This breaks the stream order known by TS demuxer and so a user can get a52
french audio when selecting "deu" ! Bad again. This patch fixes that.
-rw-r--r-- | src/xine-engine/audio_decoder.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c index 549c19b02..c271fc6fc 100644 --- a/src/xine-engine/audio_decoder.c +++ b/src/xine-engine/audio_decoder.c @@ -253,6 +253,7 @@ static void *audio_decoder_loop (void *stream_gen) { uint32_t audio_type = 0; int i,j; + uint32_t chan=buf->type&0x0000FFFF; /* printf("audio_decoder: buf_type=%08x auto=%08x user=%08x\n", @@ -264,11 +265,11 @@ static void *audio_decoder_loop (void *stream_gen) { /* update track map */ i = 0; - while ( (i<stream->audio_track_map_entries) && (stream->audio_track_map[i]<buf->type) ) + while ( (i<stream->audio_track_map_entries) && ((stream->audio_track_map[i]&0x0000FFFF)<chan) ) i++; if ( (i==stream->audio_track_map_entries) - || (stream->audio_track_map[i] != buf->type) ) { + || ((stream->audio_track_map[i]&0x0000FFFF)!=chan) ) { xine_event_t ui_event; j = stream->audio_track_map_entries; |