Commit 4c420f95 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

AVI: reduce the debug tree size

parent 1cea6f76
...@@ -867,23 +867,22 @@ void _AVI_ChunkFree( stream_t *s, ...@@ -867,23 +867,22 @@ void _AVI_ChunkFree( stream_t *s,
static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj, static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj,
avi_chunk_t *p_chk, unsigned i_level ) avi_chunk_t *p_chk, unsigned i_level )
{ {
unsigned i;
avi_chunk_t *p_child; avi_chunk_t *p_child;
char str[512]; char str[512];
if( i_level >= (sizeof(str) - 1)/5 ) if( i_level >= (sizeof(str) - 1)/4 )
return; return;
memset( str, ' ', sizeof( str ) ); 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 || if( p_chk->common.i_chunk_fourcc == AVIFOURCC_RIFF ||
p_chk->common.i_chunk_fourcc == AVIFOURCC_ON2 || p_chk->common.i_chunk_fourcc == AVIFOURCC_ON2 ||
p_chk->common.i_chunk_fourcc == AVIFOURCC_LIST ) 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, "%c %4.4s-%4.4s size:%"PRIu64" pos:%"PRIu64,
i_level ? '+' : '*', i_level ? '+' : '*',
(char*)&p_chk->common.i_chunk_fourcc, (char*)&p_chk->common.i_chunk_fourcc,
...@@ -893,7 +892,7 @@ static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj, ...@@ -893,7 +892,7 @@ static void AVI_ChunkDumpDebug_level( vlc_object_t *p_obj,
} }
else 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, "+ %4.4s size:%"PRIu64" pos:%"PRIu64,
(char*)&p_chk->common.i_chunk_fourcc, (char*)&p_chk->common.i_chunk_fourcc,
p_chk->common.i_chunk_size, p_chk->common.i_chunk_size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment