[vlc-devel] [PATCH 2/2] - leak is fixed. - Seek is working fine, demuxer seek to stream position during seek. tested with dref and without dref its working fine. - remove the unused code. - added check for empty dref.

Rajneesh Soni soni.rajneesh at gmail.com
Tue Sep 19 16:32:23 CEST 2017


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

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 98987df..96ebc90 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -66,7 +66,6 @@ vlc_module_end ()
  * Local prototypes
  *****************************************************************************/
 static int   Demux   ( demux_t * );
-//static int   DemuxRef( demux_t *p_demux ){ (void)p_demux; return 0;}
 static int   DemuxFrag( demux_t * );
 static int   Control ( demux_t *, int, va_list );
 
@@ -885,7 +884,7 @@ static int Open( vlc_object_t * p_this )
         else
         {
             msg_Warn( p_demux, "cannot find /moov/mvhd (pure ref file)" );
-            p_demux->pf_demux = Demux ;//DemuxRef;
+            p_demux->pf_demux = Demux;
             return VLC_SUCCESS;
         }
     }
@@ -3365,7 +3364,7 @@ static void MP4_TrackSetup( demux_t *p_demux, mp4_track_t *p_track,
     MP4_Box_t *p_dref = MP4_BoxGet(p_box_trak, "mdia/minf/dinf/dref");
     MP4_Box_t *p_url = MP4_BoxGet(p_dref, "url ");
 
-    if( p_url )
+    if( p_dref && BOXDATA(p_url)->psz_location)
     {
       p_track->b_is_dref = true;
       p_track->b_dref_started = false;
@@ -3538,6 +3537,9 @@ static void MP4_TrackClean( es_out_t *out, mp4_track_t *p_track )
     if( p_track->b_is_dref && p_track->s )
          vlc_stream_Delete( p_track->s );
 
+    if( p_track->p_dref_url )
+            free( p_track->p_dref_url );
+
     free( p_track->context.runs.p_array );
 }
 
-- 
2.7.4



More information about the vlc-devel mailing list