[vlc-commits] demux: mp4: move union at the end of struct

Francois Cartegnie git at videolan.org
Tue Sep 30 19:01:47 CEST 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Sep 29 21:04:48 2014 +0200| [e3dad6aba39dbfeb1e778232382adce30b3d6665] | committer: Francois Cartegnie

demux: mp4: move union at the end of struct

Wise with a struct that has a bad track record
of read overflows and now contains a pf_

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

 modules/demux/mp4/libmp4.h |   16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index b8315cb..116451c 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -1388,17 +1388,15 @@ struct MP4_Box_s
 
     uint64_t     i_size; /* always set so use it */
 
-    MP4_Box_data_t   data;   /* union of pointers on extended data depending
-                                on i_type (or i_usertype) */
-
-    struct MP4_Box_s *p_father; /* pointer on the father Box */
-
-    struct MP4_Box_s *p_first;  /* pointer on the first child Box */
-    struct MP4_Box_s *p_last;
-
-    struct MP4_Box_s *p_next;   /* pointer on the next boxes at the same level */
+    MP4_Box_t *p_father; /* pointer on the father Box */
+    MP4_Box_t *p_first;  /* pointer on the first child Box */
+    MP4_Box_t *p_last;
+    MP4_Box_t *p_next;   /* pointer on the next boxes at the same level */
 
     void (*pf_free)( MP4_Box_t *p_box ); /* pointer to free function for this box */
+
+    MP4_Box_data_t   data;   /* union of pointers on extended data depending
+                                on i_type (or i_usertype) */
 };
 
 static inline size_t mp4_box_headersize( MP4_Box_t *p_box )



More information about the vlc-commits mailing list