[vlc-commits] commit: RTP output: fix SRTP error path ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sat Mar 13 16:14:03 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 13 17:13:30 2010 +0200| [ccb91d379a0f15c1833b2381066516d7aaa15c4c] | committer: Rémi Denis-Courmont 

RTP output: fix SRTP error path

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ccb91d379a0f15c1833b2381066516d7aaa15c4c
---

 modules/stream_out/rtp.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 20b7585..ab3907b 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -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 )
         {



More information about the vlc-commits mailing list