[vlc-devel] commit: Cosmetics (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:29:43 2010 +0100| [27a3e8b537bb59fabb0f99dd381bdfe8f9a68a9b] | committer: Laurent Aimar 

Cosmetics (asf).

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

 modules/demux/asf/asf.c |   16 +++++++---------
 1 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 05fb88a..a5e1e62 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -685,11 +685,6 @@ loop_error_recovery:
 static int DemuxInit( demux_t *p_demux )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
-    bool b_seekable;
-    unsigned int i_stream;
-    asf_object_content_description_t *p_cd;
-    asf_object_index_t *p_index;
-    bool b_index;
 
     /* init context */
     p_sys->i_time   = -1;
@@ -708,6 +703,7 @@ static int DemuxInit( demux_t *p_demux )
     p_sys->meta         = NULL;
 
     /* Now load all object ( except raw data ) */
+    bool b_seekable;
     stream_Control( p_demux->s, STREAM_CAN_FASTSEEK, &b_seekable );
     if( !(p_sys->p_root = ASF_ReadObjectRoot(p_demux->s, b_seekable)) )
     {
@@ -729,14 +725,15 @@ static int DemuxInit( demux_t *p_demux )
         msg_Warn( p_demux, "ASF plugin discarded (cannot find any stream!)" );
         goto error;
     }
+    msg_Dbg( p_demux, "found %d streams", p_sys->i_track );
 
     /* check if index is available */
-    p_index = ASF_FindObject( p_sys->p_root, &asf_object_index_guid, 0 );
-    b_index = p_index && p_index->i_index_entry_count;
+    asf_object_index_t *p_index = ASF_FindObject( p_sys->p_root,
+                                                  &asf_object_index_guid, 0 );
+    const bool b_index = p_index && p_index->i_index_entry_count;
 
-    msg_Dbg( p_demux, "found %d streams", p_sys->i_track );
 
-    for( i_stream = 0; i_stream < p_sys->i_track; i_stream ++ )
+    for( unsigned i_stream = 0; i_stream < p_sys->i_track; i_stream++ )
     {
         asf_track_t    *tk;
         asf_object_stream_properties_t *p_sp;
@@ -1001,6 +998,7 @@ static int DemuxInit( demux_t *p_demux )
     /* Create meta information */
     p_sys->meta = vlc_meta_New();
 
+    asf_object_content_description_t *p_cd;
     if( ( p_cd = ASF_FindObject( p_sys->p_root->p_hdr,
                                  &asf_object_content_description_guid, 0 ) ) )
     {




More information about the vlc-devel mailing list