]> git.sesse.net Git - vlc/blobdiff - modules/demux/asf/asf.c
* all: better support for MBR mms stream (display only received streams).
[vlc] / modules / demux / asf / asf.c
index a7a73c83871bea096255a3aec87393f7059d55a6..91402277569a7b330ae1ad1f22e73524765cbc79 100644 (file)
@@ -637,6 +637,7 @@ static int DemuxInit( demux_t *p_demux )
     {
         asf_track_t    *tk;
         asf_object_stream_properties_t *p_sp;
+        vlc_bool_t b_access_selected;
 
         p_sp = ASF_FindObject( p_sys->p_root->p_hdr,
                                &asf_object_stream_properties_guid,
@@ -650,6 +651,17 @@ static int DemuxInit( demux_t *p_demux )
         tk->p_es = NULL;
         tk->p_frame = NULL;
 
+        /* Check (in case of mms) if this track is selected (ie will receive data) */
+        if( !stream_Control( p_demux->s, STREAM_CONTROL_ACCESS, ACCESS_GET_PRIVATE_ID_STATE,
+                             p_sp->i_stream_number, &b_access_selected ) &&
+            !b_access_selected )
+        {
+            tk->i_cat = UNKNOWN_ES;
+            msg_Dbg( p_demux, "ignoring not selected stream(ID:%d) (by access)",
+                     p_sp->i_stream_number );
+            continue;
+        }
+
         if( ASF_CmpGUID( &p_sp->i_stream_type, &asf_object_stream_type_audio ) &&
             p_sp->i_type_specific_data_length >= sizeof( WAVEFORMATEX ) - 2 )
         {