Commit 75f050b3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix Range handling

In RTSP/1.0, don't return any range (as far as I understand).
In RTSP/2.0, we'd have to compute the time from the beginning.
parent d8023cde
......@@ -619,6 +619,14 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
rtsp_session_t *ses;
answer->i_status = 200;
psz_session = httpd_MsgGet( query, "Session" );
const char *range = httpd_MsgGet (query, "Range");
if (range && strncmp (range, "npt=", 4))
{
answer->i_status = 501;
break;
}
vlc_mutex_lock( &rtsp->lock );
ses = RtspClientGet( rtsp, psz_session );
if( ses != NULL )
......@@ -652,7 +660,6 @@ static int RtspHandler( rtsp_stream_t *rtsp, rtsp_stream_id_t *id,
}
vlc_mutex_unlock( &rtsp->lock );
httpd_MsgAdd( answer, "Range", "npt=now-" );
if( httpd_MsgGet( query, "Scale" ) != NULL )
httpd_MsgAdd( answer, "Scale", "1." );
break;
......
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