vlc | branch: master | Francois Cartegnie <[email protected]> | Fri Jun 12 22:44:53 2015 +0200| [30c09ef4ae454d4a8b370983123db0d512ca16cc] | committer: Francois Cartegnie
demux: libmp4: constify counters/walkers > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=30c09ef4ae454d4a8b370983123db0d512ca16cc --- modules/demux/mp4/libmp4.c | 22 +++++++++++----------- modules/demux/mp4/libmp4.h | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c index dc606f0..79af23d 100644 --- a/modules/demux/mp4/libmp4.c +++ b/modules/demux/mp4/libmp4.c @@ -4155,10 +4155,10 @@ error: } -static void MP4_BoxDumpStructure_Internal( stream_t *s, - MP4_Box_t *p_box, unsigned int i_level ) +static void MP4_BoxDumpStructure_Internal( stream_t *s, const MP4_Box_t *p_box, + unsigned int i_level ) { - MP4_Box_t *p_child; + const MP4_Box_t *p_child; uint32_t i_displayedtype = p_box->i_type; if( ! MP4_BOX_TYPE_ASCII() ) ((char*)&i_displayedtype)[0] = 'c'; @@ -4194,7 +4194,7 @@ static void MP4_BoxDumpStructure_Internal( stream_t *s, } } -void MP4_BoxDumpStructure( stream_t *s, MP4_Box_t *p_box ) +void MP4_BoxDumpStructure( stream_t *s, const MP4_Box_t *p_box ) { MP4_BoxDumpStructure_Internal( s, p_box, 0 ); } @@ -4250,8 +4250,8 @@ static void get_token( char **ppsz_path, char **ppsz_token, int *pi_number ) } } -static void MP4_BoxGet_Internal( MP4_Box_t **pp_result, - MP4_Box_t *p_box, const char *psz_fmt, va_list args) +static void MP4_BoxGet_Internal( const MP4_Box_t **pp_result, const MP4_Box_t *p_box, + const char *psz_fmt, va_list args) { char *psz_dup; char *psz_path; @@ -4384,16 +4384,16 @@ error_box: * ex: /moov/trak[12] * ../mdia *****************************************************************************/ -MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, const char *psz_fmt, ... ) +MP4_Box_t *MP4_BoxGet( const MP4_Box_t *p_box, const char *psz_fmt, ... ) { va_list args; - MP4_Box_t *p_result; + const MP4_Box_t *p_result; va_start( args, psz_fmt ); MP4_BoxGet_Internal( &p_result, p_box, psz_fmt, args ); va_end( args ); - return( p_result ); + return( (MP4_Box_t *) p_result ); } /***************************************************************************** @@ -4405,11 +4405,11 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, const char *psz_fmt, ... ) * ex: /moov/trak[12] * ../mdia *****************************************************************************/ -unsigned MP4_BoxCount( MP4_Box_t *p_box, const char *psz_fmt, ... ) +unsigned MP4_BoxCount( const MP4_Box_t *p_box, const char *psz_fmt, ... ) { va_list args; unsigned i_count; - MP4_Box_t *p_result, *p_next; + const MP4_Box_t *p_result, *p_next; va_start( args, psz_fmt ); MP4_BoxGet_Internal( &p_result, p_box, psz_fmt, args ); diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h index 4e56996..32d4896 100644 --- a/modules/demux/mp4/libmp4.h +++ b/modules/demux/mp4/libmp4.h @@ -1674,7 +1674,7 @@ void MP4_BoxFree( stream_t *, MP4_Box_t *p_box ); ***************************************************************************** * Useful while debugging *****************************************************************************/ -void MP4_BoxDumpStructure( stream_t *p_input, MP4_Box_t *p_box ); +void MP4_BoxDumpStructure( stream_t *p_input, const MP4_Box_t *p_box ); /***************************************************************************** * MP4_BoxGet: find a box given a path relative to p_box @@ -1685,7 +1685,7 @@ void MP4_BoxDumpStructure( stream_t *p_input, MP4_Box_t *p_box ); * ex: /moov/trak[12] * ../mdia *****************************************************************************/ -MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, const char *psz_fmt, ... ); +MP4_Box_t *MP4_BoxGet( const MP4_Box_t *p_box, const char *psz_fmt, ... ); /***************************************************************************** * MP4_BoxCount: find number of box given a path relative to p_box @@ -1696,7 +1696,7 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, const char *psz_fmt, ... ); * ex: /moov/trak * ../mdia *****************************************************************************/ -unsigned MP4_BoxCount( MP4_Box_t *p_box, const char *psz_fmt, ... ); +unsigned MP4_BoxCount( const MP4_Box_t *p_box, const char *psz_fmt, ... ); /* Internal functions exposed for MKV demux */ int MP4_PeekBoxHeader( stream_t *p_stream, MP4_Box_t *p_box ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
