Do not crash if sout access is not specified - fixes #2665
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Apr 2009 12:24:33 +0000 (15:24 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 16 Apr 2009 12:24:33 +0000 (15:24 +0300)
Should we print an error and fail?

src/stream_output/stream_output.c

index 5777fbd..2726a35 100644 (file)
@@ -300,6 +300,8 @@ sout_access_out_t *sout_AccessOutNew( vlc_object_t *p_sout,
     psz_next = config_ChainCreate( &p_access->psz_access, &p_access->p_cfg,
                                    psz_access );
     free( psz_next );
+    if( !p_access->psz_access )
+        p_access->psz_access = strdup( "" );
     p_access->psz_path   = strdup( psz_name ? psz_name : "" );
     p_access->p_sys      = NULL;
     p_access->pf_seek    = NULL;