]> git.sesse.net Git - vlc/commitdiff
RTP output: fix SRTP error path
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 13 Mar 2010 15:13:30 +0000 (17:13 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 13 Mar 2010 15:13:47 +0000 (17:13 +0200)
modules/stream_out/rtp.c

index 20b758595f17dbe5f3a85f5775113ab8189ac8fd..ab3907b167bb17b8b64313865f561add894e1917 100644 (file)
@@ -986,7 +986,18 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
 
 #ifdef HAVE_SRTP
     id->srtp = NULL;
+#endif
+    vlc_mutex_init( &id->lock_sink );
+    id->sinkc = 0;
+    id->sinkv = NULL;
+    id->rtsp_id = NULL;
+    id->p_fifo = NULL;
+    id->listen.fd = NULL;
 
+    id->i_caching =
+        (int64_t)1000 * var_GetInteger( p_stream, SOUT_CFG_PREFIX "caching");
+
+#ifdef HAVE_SRTP
     char *key = var_CreateGetNonEmptyString (p_stream, SOUT_CFG_PREFIX"key");
     if (key)
     {
@@ -1011,16 +1022,6 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
     }
 #endif
 
-    vlc_mutex_init( &id->lock_sink );
-    id->sinkc = 0;
-    id->sinkv = NULL;
-    id->rtsp_id = NULL;
-    id->p_fifo = NULL;
-    id->listen.fd = NULL;
-
-    id->i_caching =
-        (int64_t)1000 * var_GetInteger( p_stream, SOUT_CFG_PREFIX "caching");
-
     if( p_sys->psz_destination != NULL )
         switch( p_sys->proto )
         {