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

Francois Cartegnie git at videolan.org
Wed Oct 21 17:32:09 CEST 2015


vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun  8 12:53:26 2015 +0200| [f71237661a2f273c231f88ef2983fc0b40ad8985] | committer: Jean-Baptiste Kempf

demux: mp4: reset stream position on late open failure

(cherry picked from commit a86345842d0aa2c942c5001ef5125b724a313f39)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 46c5f9a..58353eb 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -763,6 +763,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