[MPlayer-cvslog] CVS: main/libmpdemux demux_lavf.c,1.11,1.12

Michael Niedermayer CVS syncmail at mplayerhq.hu
Fri Mar 25 01:48:20 CET 2005


CVS change done by Michael Niedermayer CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv21893

Modified Files:
	demux_lavf.c 
Log Message:
discard streams we dont need


Index: demux_lavf.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_lavf.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- demux_lavf.c	30 Jan 2005 09:13:28 -0000	1.11
+++ demux_lavf.c	25 Mar 2005 00:48:18 -0000	1.12
@@ -198,8 +198,12 @@
             sh_audio->channels= codec->channels;
             sh_audio->samplerate= codec->sample_rate;
             if(verbose>=1) print_wave_header(sh_audio->wf);
-            demuxer->audio->id=i;
-            demuxer->audio->sh= demuxer->a_streams[i];
+            if(demuxer->audio->id != i && demuxer->audio->id != -1)
+                st->discard= AVDISCARD_ALL;
+            else{
+                demuxer->audio->id = i;
+                demuxer->audio->sh= demuxer->a_streams[i];
+            }
             break;}
         case CODEC_TYPE_VIDEO:{
             BITMAPINFOHEADER *bih=calloc(sizeof(BITMAPINFOHEADER) + codec->extradata_size,1);
@@ -237,9 +241,15 @@
     int  	biYPelsPerMeter;
     int 	biClrUsed;
     int 	biClrImportant;*/
-            demuxer->video->id=i;
-            demuxer->video->sh= demuxer->v_streams[i];            
+            if(demuxer->video->id != i && demuxer->video->id != -1)
+                st->discard= AVDISCARD_ALL;
+            else{
+                demuxer->video->id = i;
+                demuxer->video->sh= demuxer->v_streams[i];
+            }
             break;}
+        default:
+            st->discard= AVDISCARD_ALL;
         }
     }
     




More information about the MPlayer-cvslog mailing list