Commit eceac9eb authored by Francois Cartegnie's avatar Francois Cartegnie

demux: mp4: fix NULL dereference handling trun

parent 566a0746
...@@ -4562,6 +4562,8 @@ static int LeafParseTRUN( demux_t *p_demux, mp4_track_t *p_track, ...@@ -4562,6 +4562,8 @@ 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 ); es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + i_nzdts );
} }
if ( p_block )
{
if ( p_track->p_es ) if ( p_track->p_es )
{ {
p_block->i_dts = VLC_TS_0 + i_nzdts; p_block->i_dts = VLC_TS_0 + i_nzdts;
...@@ -4569,7 +4571,8 @@ static int LeafParseTRUN( demux_t *p_demux, mp4_track_t *p_track, ...@@ -4569,7 +4571,8 @@ static int LeafParseTRUN( demux_t *p_demux, mp4_track_t *p_track,
p_block->i_length = CLOCK_FREQ * dur / p_track->i_timescale; p_block->i_length = CLOCK_FREQ * dur / p_track->i_timescale;
MP4_Block_Send( p_demux, p_track, p_block ); MP4_Block_Send( p_demux, p_track, p_block );
} }
else free( p_block ); else block_Release( p_block );
}
chunk_size += len; chunk_size += len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment