# HG changeset patch # User nicodvb # Date 1150060705 0 # Node ID dbd99e1435bb3bfed443e0210a11caa3abe8954a # Parent e52e101e9e59323c49a4d44f3699ded2fba041bc now any audio stream can be chosen during DEMUXER_CTRL_SWITCH_AUDIO, irrispective of the codec used diff -r e52e101e9e59 -r dbd99e1435bb libmpdemux/demux_mpg.c --- a/libmpdemux/demux_mpg.c Sun Jun 11 21:16:12 2006 +0000 +++ b/libmpdemux/demux_mpg.c Sun Jun 11 21:18:25 2006 +0000 @@ -838,18 +838,14 @@ for (i = 0; i < mpg_d->num_a_streams; i++) { if (d_audio->id == mpg_d->a_stream_ids[i]) break; } - do { i = (i+1) % mpg_d->num_a_streams; sh_a = (sh_audio_t*)demuxer->a_streams[mpg_d->a_stream_ids[i]]; - } while (sh_a->format != sh_audio->format); } else { for (i = 0; i < mpg_d->num_a_streams; i++) if (*((int*)arg) == mpg_d->a_stream_ids[i]) break; if (i < mpg_d->num_a_streams) sh_a = (sh_audio_t*)demuxer->a_streams[*((int*)arg)]; - if (sh_a->format != sh_audio->format) - i = mpg_d->num_a_streams; } if (i < mpg_d->num_a_streams && d_audio->id != mpg_d->a_stream_ids[i]) { d_audio->id = mpg_d->a_stream_ids[i];