Commit 467d4c93 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RTP: pass path rather than URL to RtspSetup()

parent 8d963a22
...@@ -717,7 +717,7 @@ static void SDPHandleUrl( sout_stream_t *p_stream, const char *psz_url ) ...@@ -717,7 +717,7 @@ static void SDPHandleUrl( sout_stream_t *p_stream, const char *psz_url )
goto out; 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 ) if( p_sys->rtsp == NULL )
msg_Err( p_stream, "cannot export SDP as RTSP" ); msg_Err( p_stream, "cannot export SDP as RTSP" );
} }
......
...@@ -26,7 +26,7 @@ typedef struct rtsp_stream_t rtsp_stream_t; ...@@ -26,7 +26,7 @@ typedef struct rtsp_stream_t rtsp_stream_t;
typedef struct rtsp_stream_id_t rtsp_stream_id_t; typedef struct rtsp_stream_id_t rtsp_stream_id_t;
rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media, 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 ); void RtspUnsetup( rtsp_stream_t *rtsp );
rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid, rtsp_stream_id_t *RtspAddId( rtsp_stream_t *rtsp, sout_stream_id_t *sid,
......
...@@ -84,11 +84,11 @@ static void RtspClientDel( rtsp_stream_t *rtsp, rtsp_session_t *session ); ...@@ -84,11 +84,11 @@ static void RtspClientDel( rtsp_stream_t *rtsp, rtsp_session_t *session );
static void RtspTimeOut( void *data ); static void RtspTimeOut( void *data );
rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media, 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 ) ); rtsp_stream_t *rtsp = malloc( sizeof( *rtsp ) );
if( rtsp == NULL || ( url->i_port > 99999 ) ) if( rtsp == NULL )
{ {
free( rtsp ); free( rtsp );
return NULL; return NULL;
...@@ -111,7 +111,7 @@ rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media, ...@@ -111,7 +111,7 @@ rtsp_stream_t *RtspSetup( vlc_object_t *owner, vod_media_t *media,
goto error; 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 ) if( rtsp->psz_path == NULL )
goto error; goto error;
......
...@@ -272,7 +272,7 @@ static void MediaSetup( vod_t *p_vod, vod_media_t *p_media, ...@@ -272,7 +272,7 @@ static void MediaSetup( vod_t *p_vod, vod_media_t *p_media,
vlc_UrlParse( &url, psz_url, 0 ); vlc_UrlParse( &url, psz_url, 0 );
free( psz_url ); 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 ); vlc_UrlClean( &url );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment