[vlc-commits] demux: mp4: rename union data pointer.

Francois Cartegnie git at videolan.org
Wed Mar 26 07:43:38 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Mar 26 06:40:46 2014 +0100| [c99c90d180073d857e6d44e7765263037ca3f8ba] | committer: Francois Cartegnie

demux: mp4: rename union data pointer.

Avoid naming confusion, because data is an atom itself.

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

 modules/demux/mp4/libmp4.c |    8 ++++----
 modules/demux/mp4/libmp4.h |    4 ++--
 modules/demux/mp4/mp4.c    |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 50f77a6..ab6edc8 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -90,7 +90,7 @@ int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box )
     }
     p_box->i_pos = stream_Tell( p_stream );
 
-    p_box->data.p_data = NULL;
+    p_box->data.p_payload = NULL;
     p_box->p_father = NULL;
     p_box->p_first  = NULL;
     p_box->p_last  = NULL;
@@ -3467,7 +3467,7 @@ void MP4_BoxFree( stream_t *s, MP4_Box_t *p_box )
     }
 
     /* Now search function to call */
-    if( p_box->data.p_data )
+    if( p_box->data.p_payload )
     {
         for( i_index = 0; ; i_index++ )
         {
@@ -3493,7 +3493,7 @@ void MP4_BoxFree( stream_t *s, MP4_Box_t *p_box )
         {
             MP4_Box_Function[i_index].MP4_FreeBox_function( p_box );
         }
-        free( p_box->data.p_data );
+        free( p_box->data.p_payload );
     }
     free( p_box );
 }
@@ -3591,7 +3591,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *s )
     p_root->i_size = 0;
     CreateUUID( &p_root->i_uuid, p_root->i_type );
 
-    p_root->data.p_data = NULL;
+    p_root->data.p_payload = NULL;
     p_root->p_father    = NULL;
     p_root->p_first     = NULL;
     p_root->p_last      = NULL;
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index 3f539ec..c6c0aaf 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -1250,7 +1250,7 @@ typedef union MP4_Box_data_s
     MP4_Box_data_tfxd_t *p_tfxd;
     MP4_Box_data_hvcC_t *p_hvcC;
 
-    void                *p_data; /* for unknow type */
+    void                *p_payload; /* for unknow type */
 } MP4_Box_data_t;
 
 
@@ -1431,7 +1431,7 @@ static inline size_t mp4_box_headersize( MP4_Box_t *p_box )
     } \
     p_peek += mp4_box_headersize( p_box ); \
     i_read -= mp4_box_headersize( p_box ); \
-    if( !( p_box->data.p_data = calloc( 1, sizeof( MP4_Box_data_TYPE_t ) ) ) ) \
+    if( !( p_box->data.p_payload = calloc( 1, sizeof( MP4_Box_data_TYPE_t ) ) ) ) \
     { \
         free( p_buff ); \
         return( 0 ); \
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index a4184d5..99435b5 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -1656,7 +1656,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
                             i_sample_description_index - 1 );
 
     if( !p_sample ||
-        ( !p_sample->data.p_data && p_track->fmt.i_cat != SPU_ES ) )
+        ( !p_sample->data.p_payload && p_track->fmt.i_cat != SPU_ES ) )
     {
         msg_Warn( p_demux, "cannot find SampleEntry (track[Id 0x%x])",
                   p_track->i_track_ID );



More information about the vlc-commits mailing list