[vlc-devel] [PATCH] libmp4: 'trun' parsing: minor fixes
Frédéric Yhuel
fyhuel at viotech.net
Thu May 31 14:15:44 CEST 2012
---
modules/demux/mp4/libmp4.c | 5 +++--
modules/demux/mp4/libmp4.h | 3 +--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index ec734a6..912533f 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -650,7 +650,7 @@ static int MP4_ReadBox_trun( stream_t *p_stream, MP4_Box_t *p_box )
}
#ifdef MP4_VERBOSE
- msg_Dbg( p_stream, "read box: \"trun\" version %d flags 0x%x sample count %d",
+ msg_Dbg( p_stream, "read box: \"trun\" version %u flags 0x%x sample count %u",
p_box->data.p_trun->i_version,
p_box->data.p_trun->i_flags,
p_box->data.p_trun->i_sample_count );
@@ -658,7 +658,8 @@ static int MP4_ReadBox_trun( stream_t *p_stream, MP4_Box_t *p_box )
for( unsigned int i = 0; i<p_box->data.p_trun->i_sample_count; i++ )
{
MP4_descriptor_trun_sample_t *p_sample = &p_box->data.p_trun->p_samples[i];
- msg_Dbg( p_stream, "read box: \"trun\" sample %4.4d flags 0x%x duration %d size %d composition time offset %d",
+ msg_Dbg( p_stream, "read box: \"trun\" sample %4.4u flags 0x%x "\
+ "duration %"PRIu32" size %"PRIu32" composition time offset %"PRIu32,
i, p_sample->i_flags, p_sample->i_duration,
p_sample->i_size, p_sample->i_composition_time_offset );
}
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index 8542eb3..c25bcff 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -934,14 +934,13 @@ typedef struct MP4_Box_data_trun_s
uint32_t i_sample_count;
/* optional fields */
- uint32_t i_data_offset;
+ int32_t i_data_offset;
uint32_t i_first_sample_flags;
MP4_descriptor_trun_sample_t *p_samples;
} MP4_Box_data_trun_t;
-
typedef struct
{
char *psz_text;
--
1.7.9.5
More information about the vlc-devel
mailing list