changeset 18680:dbd99e1435bb

now any audio stream can be chosen during DEMUXER_CTRL_SWITCH_AUDIO, irrispective of the codec used
author nicodvb
date Sun, 11 Jun 2006 21:18:25 +0000
parents e52e101e9e59
children 303506bac0b5
files libmpdemux/demux_mpg.c
diffstat 1 files changed, 0 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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];