]> git.sesse.net Git - vlc/commitdiff
Fix port release logic in case there are multiple channels.
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 4 Mar 2008 18:29:56 +0000 (20:29 +0200)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 4 Mar 2008 18:29:56 +0000 (20:29 +0200)
Note however that releasing the "other" ports is still broken.

Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>
modules/stream_out/rtp.c

index 41d997686c8abbac7d665388004f8300dcddd269..170d525da2fd13986f048c545706e754a96943a5 100644 (file)
@@ -1209,13 +1209,10 @@ static int Del( sout_stream_t *p_stream, sout_stream_id_t *id )
     vlc_mutex_unlock( &p_sys->lock_es );
 
     /* Release port */
-    if( id->i_port > 0 )
-    {
-        if( id->i_cat == AUDIO_ES && p_sys->i_port_audio == 0 )
-            p_sys->i_port_audio = id->i_port;
-        else if( id->i_cat == VIDEO_ES && p_sys->i_port_video == 0 )
-            p_sys->i_port_video = id->i_port;
-    }
+    if( id->i_port == var_GetInteger( p_stream, "port-audio" ) )
+        p_sys->i_port_audio = id->i_port;
+    if( id->i_port == var_GetInteger( p_stream, "port-video" ) )
+        p_sys->i_port_video = id->i_port;
 
     free( id->psz_fmtp );