mirror of
https://code.videolan.org/videolan/vlc
synced 2024-07-25 09:41:30 +02:00
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.
This commit is contained in:
parent
d8023cde60
commit
75f050b3c6
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user