From: Laurent Aimar Date: Sat, 25 Jan 2003 17:21:40 +0000 (+0000) Subject: *mp4: fixed segfault when it fails to start a decoder and has specific X-Git-Tag: 0.5.0~166 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=96fd5143a83ad291b446dfd0401acb929fad83d7;p=vlc *mp4: fixed segfault when it fails to start a decoder and has specific informations to send. --- diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index 7d09027c60..f793b1e99c 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -2,7 +2,7 @@ * mp4.c : MP4 file input module for vlc ***************************************************************************** * Copyright (C) 2001 VideoLAN - * $Id: mp4.c,v 1.13 2003/01/25 16:58:34 fenrir Exp $ + * $Id: mp4.c,v 1.14 2003/01/25 17:21:40 fenrir Exp $ * Authors: Laurent Aimar * * This program is free software; you can redistribute it and/or modify @@ -1159,6 +1159,11 @@ static void MP4_StartDecoder( input_thread_t *p_input, input_SelectES( p_input, p_demux_track->p_es ); vlc_mutex_unlock( &p_input->stream.stream_lock ); + if( !p_demux_track->p_es->p_decoder_fifo ) + { + msg_Warn( p_input, "cannot start decoder" ); + return; + } if( p_pes_init != NULL ) { input_DecodePES( p_demux_track->p_es->p_decoder_fifo, p_pes_init );