[vlc-commits] demux: libmp4: add define for handlers
Francois Cartegnie
git at videolan.org
Thu Oct 16 20:05:21 CEST 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 16 00:40:19 2014 +0200| [84726b40410091c105e787198689db8955900806] | committer: Francois Cartegnie
demux: libmp4: add define for handlers
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84726b40410091c105e787198689db8955900806
---
modules/demux/mp4/libmp4.c | 8 ++++----
modules/demux/mp4/libmp4.h | 3 +++
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 5c92745..70f2d52 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -335,9 +335,9 @@ static int MP4_ReadBox_ilst( stream_t *p_stream, MP4_Box_t *p_box )
case 0:
msg_Warn( p_stream, "no handler for ilst atom" );
return 0;
- case VLC_FOURCC('m','d','t','a'):
+ case HANDLER_mdta:
return MP4_ReadBoxContainerChildrenIndexed( p_stream, p_box, 0, true );
- case VLC_FOURCC('m','d','i','r'):
+ case HANDLER_mdir:
return MP4_ReadBoxContainerChildren( p_stream, p_box, 0 );
default:
msg_Warn( p_stream, "Unknown ilst handler type '%4.4s'", (char*)&p_box->i_handler );
@@ -3237,8 +3237,8 @@ static int MP4_ReadBox_meta( stream_t *p_stream, MP4_Box_t *p_box )
/* Mandatory */
const MP4_Box_t *p_hdlr = MP4_BoxGet( p_box, "hdlr" );
if ( !p_hdlr || !BOXDATA(p_hdlr) ||
- ( BOXDATA(p_hdlr)->i_handler_type != VLC_FOURCC('m', 'd', 't', 'a') &&
- BOXDATA(p_hdlr)->i_handler_type != VLC_FOURCC('m', 'd', 'i', 'r') ) ||
+ ( BOXDATA(p_hdlr)->i_handler_type != HANDLER_mdta &&
+ BOXDATA(p_hdlr)->i_handler_type != HANDLER_mdir ) ||
BOXDATA(p_hdlr)->i_version != 0 )
return 0;
diff --git a/modules/demux/mp4/libmp4.h b/modules/demux/mp4/libmp4.h
index d61c3e8..2912d81 100644
--- a/modules/demux/mp4/libmp4.h
+++ b/modules/demux/mp4/libmp4.h
@@ -289,6 +289,9 @@
#define ATOM_SDLN VLC_FOURCC( 'S', 'D', 'L', 'N' )
#define ATOM_vndr VLC_FOURCC( 'v', 'n', 'd', 'r' )
+#define HANDLER_mdta VLC_FOURCC('m', 'd', 't', 'a')
+#define HANDLER_mdir VLC_FOURCC('m', 'd', 'i', 'r')
+
/* Do you want some debug information on all read boxes ? */
#ifndef NDEBUG
# define MP4_VERBOSE 1
More information about the vlc-commits
mailing list