[vlc-devel] commit: Factorized extended header search (asf). (Laurent Aimar )

git version control git at videolan.org
Sat Feb 13 21:59:51 CET 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sat Feb 13 21:31:45 2010 +0100| [f162a84f3aa6099f639f22ff4d202166599a7ae8] | committer: Laurent Aimar 

Factorized extended header search (asf).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f162a84f3aa6099f639f22ff4d202166599a7ae8
---

 modules/demux/asf/asf.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index a5e1e62..3f1e424 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -732,13 +732,15 @@ static int DemuxInit( demux_t *p_demux )
                                                   &asf_object_index_guid, 0 );
     const bool b_index = p_index && p_index->i_index_entry_count;
 
+    /* Find the extended header if any */
+    asf_object_t *p_hdr_ext = ASF_FindObject( p_sys->p_root->p_hdr,
+                                              &asf_object_header_extension_guid, 0 );
 
     for( unsigned i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
     {
         asf_track_t    *tk;
         asf_object_stream_properties_t *p_sp;
         asf_object_extended_stream_properties_t *p_esp;
-        asf_object_t *p_hdr_ext;
         bool b_access_selected;
 
         p_sp = ASF_FindObject( p_sys->p_root->p_hdr,
@@ -766,8 +768,6 @@ static int DemuxInit( demux_t *p_demux )
         }
 
         /* Find the associated extended_stream_properties if any */
-        p_hdr_ext = ASF_FindObject( p_sys->p_root->p_hdr,
-                                    &asf_object_header_extension_guid, 0 );
         if( p_hdr_ext )
         {
             int i_ext_stream = ASF_CountObject( p_hdr_ext,




More information about the vlc-devel mailing list