Commit fbe00443 authored by Frédéric Yhuel's avatar Frédéric Yhuel Committed by Jean-Baptiste Kempf

libmp4: don't parse twice the file in MP4_BoxGetRoot

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3ce7f98b
......@@ -3571,12 +3571,14 @@ MP4_Box_t *MP4_BoxGetRoot( stream_t *s )
return p_root;
p_root->i_size = stream_Size( s );
stream_Seek( p_stream, 0 );
/* Get the rest of the file */
i_result = MP4_ReadBoxContainerRaw( p_stream, p_root );
if( stream_Tell( s ) < stream_Size( s ) )
{
/* Get the rest of the file */
i_result = MP4_ReadBoxContainerRaw( p_stream, p_root );
if( !i_result )
goto error;
if( !i_result )
goto error;
}
MP4_Box_t *p_moov;
MP4_Box_t *p_cmov;
......
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