summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/demuxers/demux_mpeg_block.c3
-rw-r--r--src/xine-engine/audio_decoder.c36
2 files changed, 37 insertions, 2 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index a78dcae8d..a50ec7086 100644
--- a/src/demuxers/demux_mpeg_block.c
+++ b/src/demuxers/demux_mpeg_block.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: demux_mpeg_block.c,v 1.45 2001/09/16 22:06:28 jcdutton Exp $
+ * $Id: demux_mpeg_block.c,v 1.46 2001/09/25 23:27:02 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -134,6 +134,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
if (this->audio_fifo) {
cbuf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
cbuf->type = buf->type;
+ cbuf->decoder_info[0] = buf->decoder_info[0];
this->audio_fifo->put (this->audio_fifo, cbuf);
}
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index eb4761616..2b5320dd6 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/audio_decoder.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: audio_decoder.c,v 1.40 2001/09/14 21:25:55 richwareham Exp $
+ * $Id: audio_decoder.c,v 1.41 2001/09/25 23:27:02 guenter Exp $
*
*
* functions that implement audio decoding
@@ -135,6 +135,40 @@ void *audio_decoder_loop (void *this_gen) {
this->metronom->expect_audio_discontinuity (this->metronom);
break;
+ case BUF_CONTROL_AUDIO_CHANNEL:
+
+ printf ("audio_decoder: switching to streamtype %08x\n",
+ buf->decoder_info[0]);
+
+ i = 0;
+ while ( (i<this->audio_track_map_entries) && (this->audio_track_map[i]<buf->decoder_info[0]) )
+ i++;
+
+ printf ("audio_decoder: => virtual channel %d\n", i);
+
+ if ( (i==this->audio_track_map_entries) || (this->audio_track_map[i] != buf->decoder_info[0]) ) {
+
+ j = this->audio_track_map_entries;
+ while (j>i) {
+ this->audio_track_map[j] = this->audio_track_map[j-1];
+ j--;
+ }
+ this->audio_track_map[i] = buf->decoder_info[0];
+ this->audio_track_map_entries++;
+
+ if (i != this->audio_channel) {
+ /* close old audio decoder */
+ if (this->cur_audio_decoder_plugin) {
+ this->cur_audio_decoder_plugin->close (this->cur_audio_decoder_plugin);
+ this->cur_audio_decoder_plugin = NULL;
+ }
+ this->audio_channel = i;
+ }
+ }
+
+
+ break;
+
default:
while (this->audio_mute==2) {