[vlc-devel] commit: Fix port release logic in case there are multiple channels. ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Mar 4 19:33:34 CET 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Tue Mar  4 20:29:56 2008 +0200| [9b978809c70b0765414bc28fa7a8b7670451dffb]

Fix port release logic in case there are multiple channels.

Note however that releasing the "other" ports is still broken.

Signed-off-by: Rémi Denis-Courmont <rem at videolan.org>

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

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

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index 41d9976..170d525 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -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 );
 




More information about the vlc-devel mailing list