[vlc-commits] demux: libmp4: expose MP4_BoxNew
Francois Cartegnie
git at videolan.org
Wed Aug 3 14:49:38 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Aug 3 13:55:41 2016 +0200| [dc84a633e46192f2b38d4b450a5afe28213dd861] | committer: Francois Cartegnie
demux: libmp4: expose MP4_BoxNew
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc84a633e46192f2b38d4b450a5afe28213dd861
---
modules/demux/mp4/libmp4.c | 3 +--
modules/demux/mp4/libmp4.h | 7 +++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 743590f..4242b99 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -74,7 +74,6 @@ static void MP4_ConvertDate2Str( char *psz, uint64_t i_date, bool b_relative )
static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father );
static int MP4_Box_Read_Specific( stream_t *p_stream, MP4_Box_t *p_box, MP4_Box_t *p_father );
static void MP4_Box_Clean_Specific( MP4_Box_t *p_box );
-static inline MP4_Box_t * MP4_BoxNew( uint32_t i_type );
static int MP4_Seek( stream_t *p_stream, uint64_t i_pos )
{
@@ -4383,7 +4382,7 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father )
/*****************************************************************************
* MP4_BoxNew : creates and initializes an arbitrary box
*****************************************************************************/
-static inline MP4_Box_t * MP4_BoxNew( uint32_t i_type )
+MP4_Box_t * MP4_BoxNew( uint32_t i_type )
{
MP4_Box_t *p_box = calloc( 1, sizeof( MP4_Box_t ) );
if( likely( p_box != NULL ) )
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index 0da582e..acd2fde 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -1800,6 +1800,13 @@ MP4_Box_t *MP4_BoxGetNextChunk( stream_t * );
MP4_Box_t *MP4_BoxGetRoot( stream_t * );
/*****************************************************************************
+ * MP4_BoxNew : Allocates a new MP4 Box with its atom type
+ *****************************************************************************
+ * returns NULL on failure
+ *****************************************************************************/
+MP4_Box_t * MP4_BoxNew( uint32_t i_type );
+
+/*****************************************************************************
* MP4_FreeBox : free memory allocated after read with MP4_ReadBox
* or MP4_BoxGetRoot, this means also children boxes
* XXX : all children have to be allocated by a malloc !! and
More information about the vlc-commits
mailing list