[vlc-commits] demux: mp4: reset stream position on late open failure

Francois Cartegnie git at videolan.org
Mon Jun 8 12:55:13 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun  8 12:53:26 2015 +0200| [a86345842d0aa2c942c5001ef5125b724a313f39] | committer: Francois Cartegnie

demux: mp4: reset stream position on late open failure

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a86345842d0aa2c942c5001ef5125b724a313f39
---

 modules/demux/mp4/mp4.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 6db7dd4..0d52b40 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -953,6 +953,9 @@ static int Open( vlc_object_t * p_this )
     return VLC_SUCCESS;
 
 error:
+    if( stream_Tell( p_demux->s ) > 0 )
+        stream_Seek( p_demux->s, 0 );
+
     if( p_sys->p_root )
     {
         MP4_BoxFree( p_demux->s, p_sys->p_root );



More information about the vlc-commits mailing list