]> git.sesse.net Git - vlc/commitdiff
We only support "rtsp"; do not pretend to support rtspu, rtsps and
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 9 Sep 2007 17:06:53 +0000 (17:06 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 9 Sep 2007 17:06:53 +0000 (17:06 +0000)
whatever else might ever be invented

modules/stream_out/rtp.c

index 77651e2fe94b58bdd3e04e1ef6ab89400ec9a28a..18c6b8cd3be30517d6509148238a6ccca76ac38d 100644 (file)
@@ -312,13 +312,12 @@ static int Open( vlc_object_t *p_this )
 
     for( p_cfg = p_stream->p_cfg; p_cfg != NULL; p_cfg = p_cfg->p_next )
     {
-        if( !strcmp( p_cfg->psz_name, "sdp" ) )
+        if( !strcmp( p_cfg->psz_name, "sdp" )
+         && ( p_cfg->psz_value != NULL )
+         && !strncasecmp( p_cfg->psz_value, "rtsp:", 5 ) )
         {
-            if( p_cfg->psz_value && !strncasecmp( p_cfg->psz_value, "rtsp", 4 ) )
-            {
-                b_rtsp = VLC_TRUE;
-                break;
-            }
+            b_rtsp = VLC_TRUE;
+            break;
         }
     }
     if( !b_rtsp )
@@ -326,24 +325,15 @@ static int Open( vlc_object_t *p_this )
         psz = var_GetNonEmptyString( p_stream, SOUT_CFG_PREFIX "sdp" );
         if( psz != NULL )
         {
-            if( !strncasecmp( psz, "rtsp", 4 ) )
+            if( !strncasecmp( psz, "rtsp:", 5 ) )
                 b_rtsp = VLC_TRUE;
             free( psz );
         }
     }
 
-    if( p_sys->psz_destination == NULL )
-    {
-        if( !b_rtsp )
-        {
-            msg_Err( p_stream, "missing destination and not in RTSP mode" );
-            free( p_sys );
-            return VLC_EGENERIC;
-        }
-    }
-    else if( p_sys->i_port <= 0 )
+    if( ( p_sys->psz_destination == NULL ) && !b_rtsp )
     {
-        msg_Err( p_stream, "invalid port" );
+        msg_Err( p_stream, "missing destination and not in RTSP mode" );
         free( p_sys );
         return VLC_EGENERIC;
     }