[vlc-commits] AVI: reduce the debug tree size

Jean-Baptiste Kempf git at videolan.org
Thu May 24 12:34:28 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Thu May 24 12:27:50 2012 +0200| [4c420f95eec4acba1241c78e345deade3e3b10bb] | committer: Jean-Baptiste Kempf

AVI: reduce the debug tree size

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

 modules/demux/avi/libavi.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/demux/avi/libavi.c b/modules/demux/avi/libavi.c
index 06b26cc..de82779 100644
--- a/modules/demux/avi/libavi.c
+++ b/modules/demux/avi/libavi.c
@@ -867,23 +867,22 @@ void _AVI_ChunkFree( stream_t *s,
 static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj,
                                       avi_chunk_t  *p_chk, unsigned i_level )
 {
-    unsigned i;
     avi_chunk_t *p_child;
 
     char str[512];
-    if( i_level >= (sizeof(str) - 1)/5 )
+    if( i_level >= (sizeof(str) - 1)/4 )
         return;
 
     memset( str, ' ', sizeof( str ) );
-    for( i = 1; i < i_level; i++ )
+    for( unsigned i = 1; i < i_level; i++ )
     {
-        str[i * 5] = '|';
+        str[i * 4] = '|';
     }
     if( p_chk->common.i_chunk_fourcc == AVIFOURCC_RIFF ||
         p_chk->common.i_chunk_fourcc == AVIFOURCC_ON2  ||
         p_chk->common.i_chunk_fourcc == AVIFOURCC_LIST )
     {
-        snprintf( &str[i_level * 5], sizeof(str) - 5*i_level,
+        snprintf( &str[i_level * 4], sizeof(str) - 4*i_level,
                  "%c %4.4s-%4.4s size:%"PRIu64" pos:%"PRIu64,
                  i_level ? '+' : '*',
                  (char*)&p_chk->common.i_chunk_fourcc,
@@ -893,7 +892,7 @@ static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj,
     }
     else
     {
-        snprintf( &str[i_level * 5], sizeof(str) - 5*i_level,
+        snprintf( &str[i_level * 4], sizeof(str) - 4*i_level,
                  "+ %4.4s size:%"PRIu64" pos:%"PRIu64,
                  (char*)&p_chk->common.i_chunk_fourcc,
                  p_chk->common.i_chunk_size,



More information about the vlc-commits mailing list