Commit 693b28be authored by Pierre Ynard's avatar Pierre Ynard

rtsp: handle SETUP requests on already set up tracks

parent 66f743de
...@@ -823,8 +823,6 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id, ...@@ -823,8 +823,6 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
} }
else else
{ {
/* FIXME: we probably need to remove an access out,
* if there is already one for the same ID */
ses = RtspClientGet( rtsp, psz_session ); ses = RtspClientGet( rtsp, psz_session );
if( ses == NULL ) if( ses == NULL )
{ {
...@@ -836,6 +834,26 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id, ...@@ -836,6 +834,26 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
} }
RtspClientAlive(ses); RtspClientAlive(ses);
/* Bail if the track is already set up: we don't
* support changing the transport parameters on the
* fly */
bool setup = false;
for (int i = 0; i < ses->trackc; i++)
{
if (ses->trackv[i].id == id)
{
setup = true;
break;
}
}
if (setup)
{
vlc_mutex_unlock( &rtsp->lock );
answer->i_status = 455;
net_Close( fd );
break;
}
INSERT_ELEM( ses->trackv, ses->trackc, ses->trackc, INSERT_ELEM( ses->trackv, ses->trackc, ses->trackc,
track ); track );
vlc_mutex_unlock( &rtsp->lock ); vlc_mutex_unlock( &rtsp->lock );
......
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