Commit fbe00443 authored by yhuelf's avatar yhuelf Committed by Jean-Baptiste Kempf
Browse files

libmp4: don't parse twice the file in MP4_BoxGetRoot


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