vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Wed Jul 5 13:24:56 2017 +0200| [be864ec53eb684225560d33afd100434ab9e087f] | committer: Francois Cartegnie
demux: avi: check es_out_Send for missing/failed decoders > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=be864ec53eb684225560d33afd100434ab9e087f --- modules/demux/avi/avi.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c index 8515fcd7ce..189477079f 100644 --- a/modules/demux/avi/avi.c +++ b/modules/demux/avi/avi.c @@ -1329,7 +1329,11 @@ static int Demux_Seekable( demux_t *p_demux ) if( tk->i_dv_audio_rate ) AVI_DvHandleAudio( p_demux, tk, p_frame ); - es_out_Send( p_demux->out, tk->p_es, p_frame ); + + if( tk->p_es ) + es_out_Send( p_demux->out, tk->p_es, p_frame ); + else + block_Release( p_frame ); } } @@ -1458,7 +1462,11 @@ static int Demux_UnSeekable( demux_t *p_demux ) if( p_stream->i_dv_audio_rate ) AVI_DvHandleAudio( p_demux, p_stream, p_frame ); - es_out_Send( p_demux->out, p_stream->p_es, p_frame ); + + if( p_stream->p_es ) + es_out_Send( p_demux->out, p_stream->p_es, p_frame ); + else + block_Release( p_frame ); } else { @@ -2845,7 +2853,12 @@ static void AVI_DvHandleAudio( demux_t *p_demux, avi_track_t *tk, block_t *p_fra block_t *p_frame_audio = dv_extract_audio( p_frame ); if( p_frame_audio ) - es_out_Send( p_demux->out, tk->p_es_dv_audio, p_frame_audio ); + { + if( tk->p_es_dv_audio ) + es_out_Send( p_demux->out, tk->p_es_dv_audio, p_frame_audio ); + else + block_Release( p_frame_audio ); + } } /***************************************************************************** _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits