[vlc-commits] mp4: fix sizeof mismatch

Rémi Duraffort git at videolan.org
Sun Dec 15 22:03:31 CET 2013


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Dec 14 10:57:04 2013 +0100| [a743b5e897e07c2a809f98e8c1086ad1bd43cc5b] | committer: Rémi Duraffort

mp4: fix sizeof mismatch

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

 modules/demux/mp4/libmp4.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 561f6e0..1357f44 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -1104,7 +1104,7 @@ static int MP4_ReadBox_stts( stream_t *p_stream, MP4_Box_t *p_box )
     p_box->data.p_stts->i_sample_count =
         calloc( p_box->data.p_stts->i_entry_count, sizeof(uint32_t) );
     p_box->data.p_stts->i_sample_delta =
-        calloc( p_box->data.p_stts->i_entry_count, sizeof(uint32_t) );
+        calloc( p_box->data.p_stts->i_entry_count, sizeof(int32_t) );
     if( p_box->data.p_stts->i_sample_count == NULL
      || p_box->data.p_stts->i_sample_delta == NULL )
     {
@@ -1143,7 +1143,7 @@ static int MP4_ReadBox_ctts( stream_t *p_stream, MP4_Box_t *p_box )
     p_box->data.p_ctts->i_sample_count =
         calloc( p_box->data.p_ctts->i_entry_count, sizeof(uint32_t) );
     p_box->data.p_ctts->i_sample_offset =
-        calloc( p_box->data.p_ctts->i_entry_count, sizeof(uint32_t) );
+        calloc( p_box->data.p_ctts->i_entry_count, sizeof(int32_t) );
     if( ( p_box->data.p_ctts->i_sample_count == NULL )
      || ( p_box->data.p_ctts->i_sample_offset == NULL ) )
     {
@@ -2221,7 +2221,7 @@ static int MP4_ReadBox_elst( stream_t *p_stream, MP4_Box_t *p_box )
     p_box->data.p_elst->i_segment_duration =
         calloc( p_box->data.p_elst->i_entry_count, sizeof(uint64_t) );
     p_box->data.p_elst->i_media_time =
-        calloc( p_box->data.p_elst->i_entry_count, sizeof(uint64_t) );
+        calloc( p_box->data.p_elst->i_entry_count, sizeof(int64_t) );
     p_box->data.p_elst->i_media_rate_integer =
         calloc( p_box->data.p_elst->i_entry_count, sizeof(uint16_t) );
     p_box->data.p_elst->i_media_rate_fraction =



More information about the vlc-commits mailing list