[vlc-commits] commit: rtsp, don't timeout if DESCRIBE failed ( Sébastien Escudier )

git at videolan.org git at videolan.org
Thu Oct 7 14:25:48 CEST 2010


vlc | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Thu Oct  7 11:36:22 2010 +0200| [e21d626d6abb7009f1b48963596c3cad3156bcf1] | committer: Sébastien Escudier 

rtsp, don't timeout if DESCRIBE failed

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

 modules/demux/live555.cpp |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/modules/demux/live555.cpp b/modules/demux/live555.cpp
index 1e39346..e82207e 100644
--- a/modules/demux/live555.cpp
+++ b/modules/demux/live555.cpp
@@ -518,21 +518,21 @@ static void continueAfterDESCRIBE( RTSPClient* client, int result_code,
 {
     RTSPClientVlc *client_vlc = static_cast<RTSPClientVlc *> ( client );
     demux_sys_t *p_sys = client_vlc->p_sys;
-    char* sdpDescription = result_string;
     p_sys->i_live555_ret = result_code;
-    if ( result_code != 0 )
-    {
-        delete[] sdpDescription;
-        return;
-    }
-    free( p_sys->p_sdp );
-    p_sys->p_sdp = NULL;
-    if( sdpDescription )
+    if ( result_code == 0 )
     {
-        p_sys->p_sdp = strdup( sdpDescription );
-        delete[] sdpDescription;
+        char* sdpDescription = result_string;
+        free( p_sys->p_sdp );
+        p_sys->p_sdp = NULL;
+        if( sdpDescription )
+        {
+            p_sys->p_sdp = strdup( sdpDescription );
+            p_sys->b_error = false;
+        }
     }
-    p_sys->b_error = false;
+    else
+        p_sys->b_error = true;
+    delete[] result_string;
     p_sys->event = 1;
 }
 



More information about the vlc-commits mailing list