[vlc-devel] [PATCH] mp4: Avoid a SIGSEGV

Edward Wang edward.c.wang at compdigitec.com
Sun Oct 14 03:06:04 CEST 2012


---
 Fixes the problem that courmisch (and I, too) get with the mp4 demux.

 modules/demux/mp4/mp4.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 1c1d139..21a7695 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -2665,6 +2665,9 @@ static void MP4_TrackCreate( demux_t *p_demux, mp4_track_t *p_track,
 
 static int FreeAndResetChunk( mp4_chunk_t *ck )
 {
+    if( ck == NULL )
+        return VLC_SUCCESS;
+
     free( ck->p_sample_count_dts );
     free( ck->p_sample_delta_dts );
     free( ck->p_sample_count_pts );
-- 
1.7.5.4




More information about the vlc-devel mailing list