[vlc-commits] RTP: pass path rather than URL to RtspSetup()

Rémi Denis-Courmont git at videolan.org
Wed Sep 28 21:43:43 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 28 22:35:29 2011 +0300| [467d4c934930c9485888918a41f9236cb40be7ee] | committer: Rémi Denis-Courmont

RTP: pass path rather than URL to RtspSetup()

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

 modules/stream_out/rtp.c  |    2 +-
 modules/stream_out/rtp.h  |    2 +-
 modules/stream_out/rtsp.c |    6 +++---
 modules/stream_out/vod.c  |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index a016ce9..958470d 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -717,7 +717,7 @@ static void SDPHandleUrl( sout_stream_t *p_stream, const char *psz_url )
             goto out;
         }
 
-        p_sys->rtsp = RtspSetup( VLC_OBJECT(p_stream), NULL, &url );
+        p_sys->rtsp = RtspSetup( VLC_OBJECT(p_stream), NULL, url.psz_path );
         if( p_sys->rtsp == NULL )
             msg_Err( p_stream, "cannot export SDP as RTSP" );
     }
diff --git a/modules/stream_out/rtp.h b/modules/stream_out/rtp.h
index df57db9..adb37b2 100644
--- a/modules/stream_out/rtp.h
+++ b/modules/stream_out/rtp.h
@@ -26,7 +26,7 @@ typedef struct rtsp_stream_t rtsp_stream_t;
 typedef struct rtsp_stream_id_t rtsp_stream_id_t;
 
 rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media,
-                          const vlc_url_t *url );
+                          const char *path );
 void RtspUnsetup( rtsp_stream_t *rtsp );
 
 rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid,
diff --git a/modules/stream_out/rtsp.c b/modules/stream_out/rtsp.c
index 1426ab5..a0994d0 100644
--- a/modules/stream_out/rtsp.c
+++ b/modules/stream_out/rtsp.c
@@ -84,11 +84,11 @@ static void RtspClientDel( rtsp_stream_t *rtsp, rtsp_session_t *session );
 static void RtspTimeOut( void *data );
 
 rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media,
-                          const vlc_url_t *url )
+                          const char *path )
 {
     rtsp_stream_t *rtsp = malloc( sizeof( *rtsp ) );
 
-    if( rtsp == NULL || ( url->i_port > 99999 ) )
+    if( rtsp == NULL )
     {
         free( rtsp );
         return NULL;
@@ -111,7 +111,7 @@ rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media,
             goto error;
     }
 
-    rtsp->psz_path = strdup( ( url->psz_path != NULL ) ? url->psz_path : "/" );
+    rtsp->psz_path = strdup( (path != NULL) ? path : "/" );
     if( rtsp->psz_path == NULL )
         goto error;
 
diff --git a/modules/stream_out/vod.c b/modules/stream_out/vod.c
index 0482039..e0b81ea 100644
--- a/modules/stream_out/vod.c
+++ b/modules/stream_out/vod.c
@@ -272,7 +272,7 @@ static void MediaSetup( vod_t *p_vod, vod_media_t *p_media,
     vlc_UrlParse( &url, psz_url, 0 );
     free( psz_url );
 
-    p_media->rtsp = RtspSetup(VLC_OBJECT(p_vod), p_media, &url);
+    p_media->rtsp = RtspSetup(VLC_OBJECT(p_vod), p_media, url.psz_path);
 
     vlc_UrlClean( &url );
 



More information about the vlc-commits mailing list