[vlc-commits] demux: mp4: fix NULL dereference handling trun
Francois Cartegnie
git at videolan.org
Thu Apr 30 21:31:18 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 30 21:30:42 2015 +0200| [eceac9eb7d1b0795a8fed310e6fba8cd5a083ec0] | committer: Francois Cartegnie
demux: mp4: fix NULL dereference handling trun
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=eceac9eb7d1b0795a8fed310e6fba8cd5a083ec0
---
modules/demux/mp4/mp4.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 4d3f517..ac409d2 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -4562,14 +4562,17 @@ static int LeafParseTRUN( demux_t *p_demux, mp4_track_t *p_track,
es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_nzdts );
}
- if ( p_track->p_es )
+ if ( p_block )
{
- p_block->i_dts = VLC_TS_0 + i_nzdts;
- p_block->i_pts = VLC_TS_0 + i_nzpts;
- p_block->i_length = CLOCK_FREQ * dur / p_track->i_timescale;
- MP4_Block_Send( p_demux, p_track, p_block );
+ if ( p_track->p_es )
+ {
+ p_block->i_dts = VLC_TS_0 + i_nzdts;
+ p_block->i_pts = VLC_TS_0 + i_nzpts;
+ p_block->i_length = CLOCK_FREQ * dur / p_track->i_timescale;
+ MP4_Block_Send( p_demux, p_track, p_block );
+ }
+ else block_Release( p_block );
}
- else free( p_block );
chunk_size += len;
}
More information about the vlc-commits
mailing list