]> git.sesse.net Git - vlc/commitdiff
RTP: fix the conflicting audio and video port error handling
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 7 Jan 2009 18:48:58 +0000 (20:48 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 7 Jan 2009 18:48:58 +0000 (20:48 +0200)
modules/stream_out/rtp.c

index da26a6c8d0d643fd42cad9f86d42e80e72fa7fd9..8ec54d9cd807195fd2b33c2e5f342f9e811949f0 100644 (file)
@@ -354,11 +354,10 @@ static int Open( vlc_object_t *p_this )
 
     p_sys->psz_sdp_file = NULL;
 
-    if( p_sys->i_port_audio == p_sys->i_port_video )
+    if( p_sys->i_port_audio && p_sys->i_port_video == p_sys->i_port_audio )
     {
-        msg_Err( p_stream, "audio and video port cannot be the same" );
-        p_sys->i_port_audio = 0;
-        p_sys->i_port_video = 0;
+        msg_Err( p_stream, "audio and video RTP port must be distinct" );
+        return VLC_EGENERIC;
     }
 
     for( p_cfg = p_stream->p_cfg; p_cfg != NULL; p_cfg = p_cfg->p_next )