]> git.sesse.net Git - vlc/commitdiff
Do not generate a SDP file if SDP is not yet defined (fixes: #2981)
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 20 Jul 2009 16:51:30 +0000 (19:51 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 20 Jul 2009 16:51:30 +0000 (19:51 +0300)
modules/stream_out/rtp.c

index 2eb200d735b2f167c902e0b05dd7b7bf08da5933..bb02506252c9ec1a131b3e5e3c9eac513ee48f93 100644 (file)
@@ -1399,6 +1399,9 @@ static int FileSetup( sout_stream_t *p_stream )
     sout_stream_sys_t *p_sys = p_stream->p_sys;
     FILE            *f;
 
+    if( p_sys->psz_sdp == NULL )
+        return VLC_EGENERIC; /* too early */
+
     if( ( f = utf8_fopen( p_sys->psz_sdp_file, "wt" ) ) == NULL )
     {
         msg_Err( p_stream, "cannot open file '%s' (%m)",