changeset 6124:12b1f920c1f4

a/v stream selection - patch by alexander.werth@gmx.de
author arpi
date Sun, 19 May 2002 23:25:40 +0000
parents d5606e4d0280
children 018a0d7dddd4
files libmpdemux/demux_ogg.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ogg.c	Sun May 19 23:22:11 2002 +0000
+++ b/libmpdemux/demux_ogg.c	Sun May 19 23:25:40 2002 +0000
@@ -531,23 +531,23 @@
 	// If the audio stream is not defined we took the first one
 	if(demuxer->audio->id == -1) {
 	  demuxer->audio->id = ogg_d->num_sub;
-	  demuxer->audio->sh = sh_a;
-	  sh_a->ds = demuxer->audio;
 //	  if(sh_a->wf) print_wave_header(sh_a->wf);
 	}
 	/// Is it the stream we want
 	if(demuxer->audio->id == ogg_d->num_sub)
+	  demuxer->audio->sh = sh_a;
+	  sh_a->ds = demuxer->audio;
 	  ds = demuxer->audio;
       }
       if(sh_v) {
 	/// Also for video
 	if(demuxer->video->id == -1) {
 	  demuxer->video->id = ogg_d->num_sub;
-	  demuxer->video->sh = sh_v;
-	  sh_v->ds = demuxer->video;
 //	  if(sh_v->bih) print_video_header(sh_v->bih);
 	}
 	if(demuxer->video->id == ogg_d->num_sub)
+	  demuxer->video->sh = sh_v;
+	  sh_v->ds = demuxer->video;
 	  ds = demuxer->video;
       }
       /// Add the header packets if the stream isn't seekable