]> git.sesse.net Git - vlc/commitdiff
- refuse to act if Range is specified since we cannot seek
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 26 Aug 2007 06:09:20 +0000 (06:09 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 26 Aug 2007 06:09:20 +0000 (06:09 +0000)
- always round Scale to 1 because we only support that value

modules/stream_out/rtsp.c

index bee0496426c8db686667d8e1c5902d9acf42ceec..151270db781f52ea2a3376815957ff96000f52e3 100644 (file)
@@ -332,6 +332,11 @@ static int RtspCallback( httpd_callback_sys_t *p_args,
             answer->i_status = 200;
 
             psz_session = httpd_MsgGet( query, "Session" );
+            if( httpd_MsgGet( query, "Range" ) != NULL )
+            {
+                answer->i_status = 456; /* cannot seek */
+                break;
+            }
 
             vlc_mutex_lock( &rtsp->lock );
             ses = RtspClientGet( rtsp, psz_session );
@@ -348,6 +353,9 @@ static int RtspCallback( httpd_callback_sys_t *p_args,
                 }
             }
             vlc_mutex_unlock( &rtsp->lock );
+
+            if( httpd_MsgGet( query, "Scale" ) != NULL )
+                httpd_MsgAdd( answer, "Scale", "1." );
             break;
         }
 
@@ -630,6 +638,11 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args,
             answer->i_status = 200;
 
             psz_session = httpd_MsgGet( query, "Session" );
+            if( httpd_MsgGet( query, "Range" ) != NULL )
+            {
+                answer->i_status = 456; /* cannot seek */
+                break;
+            }
 
             vlc_mutex_lock( &rtsp->lock );
             ses = RtspClientGet( rtsp, psz_session );
@@ -646,6 +659,9 @@ static int RtspCallbackId( httpd_callback_sys_t *p_args,
                 }
             }
             vlc_mutex_unlock( &rtsp->lock );
+
+            if( httpd_MsgGet( query, "Scale" ) != NULL )
+                httpd_MsgAdd( answer, "Scale", "1." );
             break;
         }