[vlc-commits] demux: mp4: fix NULL dereference handling trun
Francois Cartegnie
git at videolan.org
Fri May 1 02:58:00 CEST 2015
vlc/vlc-2.2 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Apr 30 21:30:42 2015 +0200| [cdcfa8a9f529c7e6ec25685e883129db8347b95b] | committer: Jean-Baptiste Kempf
demux: mp4: fix NULL dereference handling trun
(cherry picked from commit eceac9eb7d1b0795a8fed310e6fba8cd5a083ec0)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=cdcfa8a9f529c7e6ec25685e883129db8347b95b
---
modules/demux/mp4/mp4.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 7a52103..46c5f9a 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -4864,13 +4864,16 @@ 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;
- es_out_Send( p_demux->out, p_track->p_es, 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;
+ es_out_Send( p_demux->out, p_track->p_es, p_block );
+ }
+ else block_Release( p_block );
}
- else free( p_block );
chunk_size += len;
}
More information about the vlc-commits
mailing list