[vlc-commits] libmp4: 'trun' parsing: minor fixes

Frédéric Yhuel git at videolan.org
Thu May 31 14:37:00 CEST 2012


vlc | branch: master | Frédéric Yhuel <fyhuel at viotech.net> | Thu May 31 14:15:44 2012 +0200| [9240f975ed2fa5e445e047b9443b00cbd7e7cb6d] | committer: Jean-Baptiste Kempf

libmp4: 'trun' parsing: minor fixes

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/mp4/libmp4.c |    5 +++--
 modules/demux/mp4/libmp4.h |    2 +-
 2 files changed, 4 insertions(+), 3 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 ff5938f..fed1b74 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -935,7 +935,7 @@ 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;



More information about the vlc-commits mailing list