aboutsummaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorPacketVideo CM <engbuild@pv.com>2010-06-15 16:35:53 -0700
committerPacketVideo CM <engbuild@pv.com>2010-06-15 16:35:53 -0700
commit44f912fbd0636506d69875b2f81c61926cc271b3 (patch)
tree6136a66f869b2ea745c70640d44ce2277243d0e6 /protocols
parenta1d901db772561b00a144d22c09fe0fc8f016709 (diff)
downloadopencore-44f912fbd0636506d69875b2f81c61926cc271b3.tar.gz
RIO-8847: Fix parsing of certain RTSP URLs.
Change-Id: Ie477931e1b590d0277ec12f055a4a3a151706d81
Diffstat (limited to 'protocols')
-rw-r--r--protocols/rtsp_client_engine/src/pvrtsp_client_engine_node.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/rtsp_client_engine/src/pvrtsp_client_engine_node.cpp b/protocols/rtsp_client_engine/src/pvrtsp_client_engine_node.cpp
index 5dde88830..a613db57b 100644
--- a/protocols/rtsp_client_engine/src/pvrtsp_client_engine_node.cpp
+++ b/protocols/rtsp_client_engine/src/pvrtsp_client_engine_node.cpp
@@ -2261,6 +2261,14 @@ OSCL_EXPORT_REF bool PVRTSPEngineNode::parseURL(const char *aUrl)
/* Locate the server name. */
mbchar *server_port_ptr = OSCL_CONST_CAST(mbchar*, oscl_strstr(server_ip_ptr, ":"));
+ // This check is to ensure that the server port is retrieved from the URL only if there
+ // is an abs_path or media name present after the first occurrence of ":". This is
+ // found by checking for a "/" after a potential port pointer is found.
+ mbchar *clip_name_following_port = NULL;
+ if (server_port_ptr != NULL)
+ {
+ clip_name_following_port = OSCL_CONST_CAST(mbchar*, oscl_strstr(server_port_ptr, "/"));
+ }
mbchar *clip_name = OSCL_CONST_CAST(mbchar*, oscl_strstr(server_ip_ptr, "/"));
if (clip_name != NULL)
{
@@ -2269,7 +2277,7 @@ OSCL_EXPORT_REF bool PVRTSPEngineNode::parseURL(const char *aUrl)
/* Locate the port number if provided. */
iSessionInfo.iSrvAdd.port = (iSessionInfo.iStreamingType == PVRTSP_RM_HTTP) ? DEFAULT_HTTP_PORT : DEFAULT_RTSP_PORT;
- if ((server_port_ptr != NULL) && (*(server_port_ptr + 1) != '/'))
+ if ((server_port_ptr != NULL) && (*(server_port_ptr + 1) != '/') && (clip_name_following_port != NULL))
{
*(server_port_ptr++) = '\0';
uint32 atoi_tmp;