Use Live555 'double authorization' for RTSP-over-HTTP
authorSteven Kramer <skramer@inbeeld.eu>
Mon, 26 Jan 2009 13:28:19 +0000 (14:28 +0100)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Mon, 26 Jan 2009 16:08:00 +0000 (18:08 +0200)
Signed-off-by: Rémi Denis-Courmont <rdenis@simphalempin.com>
modules/demux/live555.cpp

index 843ef3d..faeaddb 100644 (file)
@@ -552,6 +552,17 @@ describe:
     psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
                                                &authenticator );
 #endif
+    if( psz_options == NULL && authenticator.realm() != NULL )
+    {
+        // try again, with the realm set this time
+#if LIVEMEDIA_LIBRARY_VERSION_INT >= 1223337600
+        psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
+                                               &authenticator, timeout );
+#else
+        psz_options = p_sys->rtsp->sendOptionsCmd( psz_url, psz_user, psz_pwd,
+                                               &authenticator );
+#endif
+    }
     if( psz_options )
     {
         p_sys->b_get_param = strstr( psz_options, "GET_PARAMETER" ) ? true : false ;