Commit 53474be3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

- refuse to act if Range is specified since we cannot seek

- always round Scale to 1 because we only support that value
parent efece9e0
...@@ -332,6 +332,11 @@ static int RtspCallback( httpd_callback_sys_t *p_args, ...@@ -332,6 +332,11 @@ static int RtspCallback( httpd_callback_sys_t *p_args,
answer->i_status = 200; answer->i_status = 200;
psz_session = httpd_MsgGet( query, "Session" ); psz_session = httpd_MsgGet( query, "Session" );
if( httpd_MsgGet( query, "Range" ) != NULL )
{
answer->i_status = 456; /* cannot seek */
break;
}
vlc_mutex_lock( &rtsp->lock ); vlc_mutex_lock( &rtsp->lock );
ses = RtspClientGet( rtsp, psz_session ); ses = RtspClientGet( rtsp, psz_session );
...@@ -348,6 +353,9 @@ static int RtspCallback( httpd_callback_sys_t *p_args, ...@@ -348,6 +353,9 @@ static int RtspCallback( httpd_callback_sys_t *p_args,
} }
} }
vlc_mutex_unlock( &rtsp->lock ); vlc_mutex_unlock( &rtsp->lock );
if( httpd_MsgGet( query, "Scale" ) != NULL )
httpd_MsgAdd( answer, "Scale", "1." );
break; break;
} }
...@@ -630,6 +638,11 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args, ...@@ -630,6 +638,11 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args,
answer->i_status = 200; answer->i_status = 200;
psz_session = httpd_MsgGet( query, "Session" ); psz_session = httpd_MsgGet( query, "Session" );
if( httpd_MsgGet( query, "Range" ) != NULL )
{
answer->i_status = 456; /* cannot seek */
break;
}
vlc_mutex_lock( &rtsp->lock ); vlc_mutex_lock( &rtsp->lock );
ses = RtspClientGet( rtsp, psz_session ); ses = RtspClientGet( rtsp, psz_session );
...@@ -646,6 +659,9 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args, ...@@ -646,6 +659,9 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args,
} }
} }
vlc_mutex_unlock( &rtsp->lock ); vlc_mutex_unlock( &rtsp->lock );
if( httpd_MsgGet( query, "Scale" ) != NULL )
httpd_MsgAdd( answer, "Scale", "1." );
break; 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