Commit b26d9bf5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

MP4: Use defines instead of VLC_FOURCC

parent 05368cee
...@@ -334,7 +334,7 @@ static int MP4_ReadBoxSkip( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -334,7 +334,7 @@ static int MP4_ReadBoxSkip( stream_t *p_stream, MP4_Box_t *p_box )
{ {
/* XXX sometime moov is hiden in a free box */ /* XXX sometime moov is hiden in a free box */
if( p_box->p_father && if( p_box->p_father &&
p_box->p_father->i_type == VLC_FOURCC( 'r', 'o', 'o', 't' ) && p_box->p_father->i_type == ATOM_root &&
p_box->i_type == ATOM_free ) p_box->i_type == ATOM_free )
{ {
const uint8_t *p_peek; const uint8_t *p_peek;
...@@ -1284,7 +1284,7 @@ static int MP4_ReadBox_gnre( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -1284,7 +1284,7 @@ static int MP4_ReadBox_gnre( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( i_data_len ); MP4_GET4BYTES( i_data_len );
MP4_GETFOURCC( i_data_tag ); MP4_GETFOURCC( i_data_tag );
if( i_data_len < 10 || i_data_tag != VLC_FOURCC('d', 'a', 't', 'a') ) if( i_data_len < 10 || i_data_tag != ATOM_data )
MP4_READBOX_EXIT( 0 ); MP4_READBOX_EXIT( 0 );
uint32_t i_version; uint32_t i_version;
...@@ -1313,7 +1313,7 @@ static int MP4_ReadBox_trkn( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -1313,7 +1313,7 @@ static int MP4_ReadBox_trkn( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( i_data_len ); MP4_GET4BYTES( i_data_len );
MP4_GETFOURCC( i_data_tag ); MP4_GETFOURCC( i_data_tag );
if( i_data_len < 12 || i_data_tag != VLC_FOURCC('d', 'a', 't', 'a') ) if( i_data_len < 12 || i_data_tag != ATOM_data )
MP4_READBOX_EXIT( 0 ); MP4_READBOX_EXIT( 0 );
uint32_t i_version; uint32_t i_version;
...@@ -2506,7 +2506,7 @@ static int MP4_ReadBox_0xa9xxx( stream_t *p_stream, MP4_Box_t *p_box ) ...@@ -2506,7 +2506,7 @@ static int MP4_ReadBox_0xa9xxx( stream_t *p_stream, MP4_Box_t *p_box )
MP4_GET4BYTES( i_data_len ); MP4_GET4BYTES( i_data_len );
if( i_data_len > i_read ) i_data_len = i_read; if( i_data_len > i_read ) i_data_len = i_read;
MP4_GETFOURCC( i_data_tag ); MP4_GETFOURCC( i_data_tag );
if( (i_data_len > 0) && (i_data_tag == VLC_FOURCC('d', 'a', 't', 'a')) ) if( (i_data_len > 0) && (i_data_tag == ATOM_data) )
{ {
/* data box contains a version/flags field */ /* data box contains a version/flags field */
uint32_t i_version; uint32_t i_version;
...@@ -3088,7 +3088,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *s ) ...@@ -3088,7 +3088,7 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *s )
return NULL; return NULL;
p_root->i_pos = 0; p_root->i_pos = 0;
p_root->i_type = VLC_FOURCC( 'r', 'o', 'o', 't' ); p_root->i_type = ATOM_root;
p_root->i_shortsize = 1; p_root->i_shortsize = 1;
p_root->i_size = stream_Size( s ); p_root->i_size = stream_Size( s );
CreateUUID( &p_root->i_uuid, p_root->i_type ); CreateUUID( &p_root->i_uuid, p_root->i_type );
...@@ -3285,7 +3285,7 @@ static void MP4_BoxGet_Internal( MP4_Box_t **pp_result, ...@@ -3285,7 +3285,7 @@ static void MP4_BoxGet_Internal( MP4_Box_t **pp_result,
if( !strcmp( psz_token, "/" ) ) if( !strcmp( psz_token, "/" ) )
{ {
/* Find root box */ /* Find root box */
while( p_box && p_box->i_type != VLC_FOURCC( 'r', 'o', 'o', 't' ) ) while( p_box && p_box->i_type != ATOM_root )
{ {
p_box = p_box->p_father; p_box = p_box->p_father;
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#ifndef _VLC_MP4_H #ifndef _VLC_MP4_H
#define _VLC_MP4_H 1 #define _VLC_MP4_H 1
#define ATOM_root VLC_FOURCC( 'r', 'o', 'o', 't' )
#define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' ) #define ATOM_uuid VLC_FOURCC( 'u', 'u', 'i', 'd' )
#define ATOM_ftyp VLC_FOURCC( 'f', 't', 'y', 'p' ) #define ATOM_ftyp VLC_FOURCC( 'f', 't', 'y', 'p' )
...@@ -39,6 +40,8 @@ ...@@ -39,6 +40,8 @@
#define ATOM_udta VLC_FOURCC( 'u', 'd', 't', 'a' ) #define ATOM_udta VLC_FOURCC( 'u', 'd', 't', 'a' )
#define ATOM_wide VLC_FOURCC( 'w', 'i', 'd', 'e' ) #define ATOM_wide VLC_FOURCC( 'w', 'i', 'd', 'e' )
#define ATOM_data VLC_FOURCC( 'd', 'a', 't', 'a' )
#define ATOM_trak VLC_FOURCC( 't', 'r', 'a', 'k' ) #define ATOM_trak VLC_FOURCC( 't', 'r', 'a', 'k' )
#define ATOM_mvhd VLC_FOURCC( 'm', 'v', 'h', 'd' ) #define ATOM_mvhd VLC_FOURCC( 'm', 'v', 'h', 'd' )
#define ATOM_tkhd VLC_FOURCC( 't', 'k', 'h', 'd' ) #define ATOM_tkhd VLC_FOURCC( 't', 'k', 'h', 'd' )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment