Commit 8543c65f authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: rename ReadBoxCommon

parent ba3a2185
......@@ -1405,7 +1405,7 @@ int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
p_tk->p_extra_data,
p_tk->i_extra_data,
true );
if( MP4_ReadBoxCommon( p_mp4_stream, p_box ) &&
if( MP4_PeekBoxHeader( p_mp4_stream, p_box ) &&
MP4_ReadBox_sample_vide( p_mp4_stream, p_box ) )
{
p_tk->fmt.i_codec = p_box->i_type;
......
......@@ -110,14 +110,14 @@ static void MP4_BoxAddChild( MP4_Box_t *p_parent, MP4_Box_t *p_childbox )
#define stream_Seek(a,b) __NO__
/*****************************************************************************
* MP4_ReadBoxCommon : Load only common parameters for all boxes
* MP4_PeekBoxHeader : Load only common parameters for all boxes
*****************************************************************************
* p_box need to be an already allocated MP4_Box_t, and all data
* will only be peek not read
*
* RETURN : 0 if it fail, 1 otherwise
*****************************************************************************/
int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box )
int MP4_PeekBoxHeader( stream_t *p_stream, MP4_Box_t *p_box )
{
int i_read;
const uint8_t *p_peek;
......@@ -186,7 +186,7 @@ static int MP4_NextBox( stream_t *p_stream, MP4_Box_t *p_box )
if( !p_box )
{
if ( !MP4_ReadBoxCommon( p_stream, &box ) )
if ( !MP4_PeekBoxHeader( p_stream, &box ) )
return 0;
p_box = &box;
}
......@@ -3975,7 +3975,7 @@ static MP4_Box_t *MP4_ReadBox( stream_t *p_stream, MP4_Box_t *p_father )
if( p_box == NULL )
return NULL;
if( !MP4_ReadBoxCommon( p_stream, p_box ) )
if( !MP4_PeekBoxHeader( p_stream, p_box ) )
{
msg_Warn( p_stream, "cannot read one box" );
free( p_box );
......@@ -4105,7 +4105,7 @@ MP4_Box_t *MP4_BoxGetNextChunk( stream_t *s )
return NULL;
/* We might get a ftyp box or a SmooBox */
MP4_ReadBoxCommon( s, p_tmp_box );
MP4_PeekBoxHeader( s, p_tmp_box );
if( (p_tmp_box->i_type == ATOM_uuid && !CmpUUID( &p_tmp_box->i_uuid, &SmooBoxUUID )) )
{
......
......@@ -1705,7 +1705,7 @@ MP4_Box_t *MP4_BoxGet( MP4_Box_t *p_box, const char *psz_fmt, ... );
int MP4_BoxCount( MP4_Box_t *p_box, const char *psz_fmt, ... );
/* Internal functions exposed for MKV demux */
int MP4_ReadBoxCommon( stream_t *p_stream, MP4_Box_t *p_box );
int MP4_PeekBoxHeader( stream_t *p_stream, MP4_Box_t *p_box );
int MP4_ReadBoxContainerChildren( stream_t *p_stream, MP4_Box_t *p_container,
uint32_t i_last_child );
int MP4_ReadBox_sample_vide( stream_t *p_stream, MP4_Box_t *p_box );
......
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