[vlc-devel] [PATCH] libmp4: small bug fix

Frédéric Yhuel yhuelf at gmail.com
Sun Jan 27 23:02:57 CET 2013


When MP4_ReadBoxContainerChildren() returns, one expects the position in
the stream to be that of the next box after the last parsed box.

Without this very patch, if the last parsed box is an "unknown" one,
the position in the stream would be at the begining of that box,
preventing playback of latest Anevia's MS Smooth Streaming live streams,
for example.
---
 modules/demux/mp4/libmp4.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index bcd0df8..a5cb74f 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -215,7 +215,10 @@ static int MP4_ReadBoxContainerChildren( stream_t *p_stream,
         p_container->p_last = p_box;
 
         if( p_box->i_type == i_last_child )
+        {
+            MP4_NextBox( p_stream, p_box );
             break;
+        }
 
     } while( MP4_NextBox( p_stream, p_box ) == 1 );
 
-- 
1.7.10.4



More information about the vlc-devel mailing list