From 851f437fd0a3d7bac2a919f49245112d8f0dd5d7 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Wed, 11 Dec 2002 20:13:50 +0000 Subject: [PATCH] * all: access plugins should not modify p_input->stream.p_selected_area->i_tell when reading data. (It's done in input_SplitBuffer). (But access should still set it on a "seek") --- modules/access/http.c | 11 ++--------- modules/access/rtp.c | 9 +-------- modules/access/udp.c | 9 +-------- 3 files changed, 4 insertions(+), 25 deletions(-) diff --git a/modules/access/http.c b/modules/access/http.c index fcd91236d8..f494ac82c7 100644 --- a/modules/access/http.c +++ b/modules/access/http.c @@ -2,7 +2,7 @@ * http.c: HTTP access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: http.c,v 1.15 2002/12/06 12:54:30 sam Exp $ + * $Id: http.c,v 1.16 2002/12/11 20:13:50 fenrir Exp $ * * Authors: Christophe Massiot * @@ -362,7 +362,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell ) if( p_input->stream.p_selected_area->i_size ) { - p_input->stream.p_selected_area->i_tell = i_tell + p_input->stream.p_selected_area->i_tell = i_tell; + (p_input->p_last_data - p_input->p_current_data); } else @@ -708,13 +708,6 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) { ssize_t i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); - if( i_recv > 0 ) - { - vlc_mutex_lock( &p_input->stream.stream_lock ); - p_input->stream.p_selected_area->i_tell += i_recv; - vlc_mutex_unlock( &p_input->stream.stream_lock ); - } - if( i_recv < 0 ) { #ifdef HAVE_ERRNO_H diff --git a/modules/access/rtp.c b/modules/access/rtp.c index 3462cc7edc..73556af2a1 100644 --- a/modules/access/rtp.c +++ b/modules/access/rtp.c @@ -2,7 +2,7 @@ * rtp.c: RTP access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: rtp.c,v 1.7 2002/12/06 16:34:04 sam Exp $ + * $Id: rtp.c,v 1.8 2002/12/11 20:13:50 fenrir Exp $ * * Authors: Tristan Leteurtre * @@ -380,13 +380,6 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) { ssize_t i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); - if( i_recv > 0 ) - { - vlc_mutex_lock( &p_input->stream.stream_lock ); - p_input->stream.p_selected_area->i_tell += i_recv; - vlc_mutex_unlock( &p_input->stream.stream_lock ); - } - if( i_recv < 0 ) { msg_Err( p_input, "recv failed (%s)", strerror(errno) ); diff --git a/modules/access/udp.c b/modules/access/udp.c index 2138287d56..a086d846f6 100644 --- a/modules/access/udp.c +++ b/modules/access/udp.c @@ -2,7 +2,7 @@ * udp.c: raw UDP access plug-in ***************************************************************************** * Copyright (C) 2001, 2002 VideoLAN - * $Id: udp.c,v 1.4 2002/11/12 13:57:12 sam Exp $ + * $Id: udp.c,v 1.5 2002/12/11 20:13:50 fenrir Exp $ * * Authors: Christophe Massiot * @@ -320,13 +320,6 @@ static ssize_t Read( input_thread_t * p_input, byte_t * p_buffer, size_t i_len ) { ssize_t i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); - if( i_recv > 0 ) - { - vlc_mutex_lock( &p_input->stream.stream_lock ); - p_input->stream.p_selected_area->i_tell += i_recv; - vlc_mutex_unlock( &p_input->stream.stream_lock ); - } - if( i_recv < 0 ) { msg_Err( p_input, "recv failed (%s)", strerror(errno) );