From: Laurent Aimar Date: Fri, 1 Aug 2003 18:42:56 +0000 (+0000) Subject: * stream_output.c: fixed a segfault when muxer isn't specified. X-Git-Tag: 0.6.2~78 X-Git-Url: http://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=commitdiff_plain;h=b62b2827cd8a7fb94eb65799520ba06818a80a0c;ds=sidebyside * stream_output.c: fixed a segfault when muxer isn't specified. --- diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c index f932c2ebef..cdbf73546d 100644 --- a/src/stream_output/stream_output.c +++ b/src/stream_output/stream_output.c @@ -2,7 +2,7 @@ * stream_output.c : stream output module ***************************************************************************** * Copyright (C) 2002 VideoLAN - * $Id: stream_output.c,v 1.31 2003/07/31 19:24:10 fenrir Exp $ + * $Id: stream_output.c,v 1.32 2003/08/01 18:42:56 fenrir Exp $ * * Authors: Christophe Massiot * Laurent Aimar @@ -946,6 +946,11 @@ char * sout_cfg_parser( char **ppsz_name, sout_cfg_t **pp_cfg, char *psz_chain ) *ppsz_name = NULL; *pp_cfg = NULL; + if( p == NULL ) + { + return NULL; + } + SKIPSPACE( p ); while( *p && *p != '{' && *p != ':' && *p != ' ' && *p != '\t' ) @@ -1161,8 +1166,6 @@ sout_stream_t *sout_stream_new( sout_instance_t *p_sout, void sout_stream_delete( sout_stream_t *p_stream ) { - sout_cfg_t *p_cfg; - msg_Dbg( p_stream, "destroying chain... (name=%s)", p_stream->psz_name ); if( p_stream->p_module ) module_Unneed( p_stream, p_stream->p_module );