-@@ -791,6 +843,8 @@ httpd_stream_t *httpd_StreamNew( httpd_host_t *host,
- * (this way i_body_offset can never be 0) */
- stream->i_buffer_pos = 1;
- stream->i_buffer_last_pos = 1;
-+ stream->b_has_keyframes = false;
-+ stream->i_last_keyframe_seen_pos = 0;
-
- httpd_UrlCatch( stream->url, HTTPD_MSG_HEAD, httpd_StreamCallBack,
- (httpd_callback_sys_t*)stream );
-@@ -819,22 +873,10 @@ int httpd_StreamHeader( httpd_stream_t *stream, uint8_t *p_data, int i_data )
- return VLC_SUCCESS;
- }
-
--int httpd_StreamSend( httpd_stream_t *stream, uint8_t *p_data, int i_data )
-+static void httpd_AppendData( httpd_stream_t *stream, uint8_t *p_data, int i_data )
- {
-- int i_count;
-- int i_pos;
--
-- if( i_data < 0 || p_data == NULL )
-- {
-- return VLC_SUCCESS;
-- }
-- vlc_mutex_lock( &stream->lock );
--
-- /* save this pointer (to be used by new connection) */
-- stream->i_buffer_last_pos = stream->i_buffer_pos;
--
-- i_pos = stream->i_buffer_pos % stream->i_buffer_size;
-- i_count = i_data;
-+ int i_pos = stream->i_buffer_pos % stream->i_buffer_size;
-+ int i_count = i_data;
- while( i_count > 0)
- {
- int i_copy;
-@@ -850,6 +892,40 @@ int httpd_StreamSend( httpd_stream_t *stream, uint8_t *p_data, int i_data )