[vlc-commits] demux: mp4: don't seek to mdat after each probing

Francois Cartegnie git at videolan.org
Wed Oct 14 16:58:29 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Oct 14 16:52:23 2015 +0200| [1ac48962ce382e3640157fb8a165c4a1b90aebc5] | committer: Francois Cartegnie

demux: mp4: don't seek to mdat after each probing

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

 modules/demux/mp4/mp4.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 1d0cd2a..8ff5961 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -670,6 +670,13 @@ static int Open( vlc_object_t * p_this )
 
             if ( p_sys->b_fragmented && !p_sys->i_overall_duration )
                 ProbeFragments( p_demux, true );
+
+            MP4_Box_t *p_mdat = MP4_BoxGet( p_sys->p_root, "mdat" );
+            if ( p_mdat )
+            {
+                stream_Seek( p_demux->s, p_mdat->i_pos );
+                msg_Dbg( p_demux, "rewinding to mdat %"PRId64, p_mdat->i_pos );
+            }
         }
         else
             p_sys->b_fragmented = true;
@@ -4459,13 +4466,6 @@ static int ProbeFragments( demux_t *p_demux, bool b_force )
         p_moof = p_moof->p_next;
     }
 
-    MP4_Box_t *p_mdat = MP4_BoxGet( p_sys->p_root, "mdat" );
-    if ( p_mdat )
-    {
-        stream_Seek( p_demux->s, p_mdat->i_pos );
-        msg_Dbg( p_demux, "rewinding to mdat %"PRId64, p_mdat->i_pos );
-    }
-
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list