Commit 4a0ddd5b authored by Laurent Aimar's avatar Laurent Aimar

 * all : fix for new use of p_selected_area->i_tell.

 Just a word: now we cannot update anymore p_input->p_current_data
without updating i_tell. I known that it's used for skipping some bytes in
mp3 demux (not yet fixed), I don't known if it's used elsewhere....
parent 09cbae7e
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libasf.c : * libasf.c :
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: libasf.c,v 1.2 2002/10/21 09:18:37 fenrir Exp $ * $Id: libasf.c,v 1.3 2002/10/26 19:14:45 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -97,8 +97,8 @@ off_t ASF_TellAbsolute( input_thread_t *p_input ) ...@@ -97,8 +97,8 @@ off_t ASF_TellAbsolute( input_thread_t *p_input )
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
i_pos= p_input->stream.p_selected_area->i_tell - i_pos= p_input->stream.p_selected_area->i_tell;
( p_input->p_last_data - p_input->p_current_data ); // - ( p_input->p_last_data - p_input->p_current_data );
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libavi.c : * libavi.c :
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: libavi.c,v 1.1 2002/10/15 00:56:43 fenrir Exp $ * $Id: libavi.c,v 1.2 2002/10/26 19:14:45 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -75,8 +75,8 @@ off_t AVI_TellAbsolute( input_thread_t *p_input ) ...@@ -75,8 +75,8 @@ off_t AVI_TellAbsolute( input_thread_t *p_input )
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
i_pos= p_input->stream.p_selected_area->i_tell - i_pos= p_input->stream.p_selected_area->i_tell;
( p_input->p_last_data - p_input->p_current_data ); // - ( p_input->p_last_data - p_input->p_current_data );
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
...@@ -169,6 +169,8 @@ int AVI_ReadData( input_thread_t *p_input, u8 *p_buff, int i_size ) ...@@ -169,6 +169,8 @@ int AVI_ReadData( input_thread_t *p_input, u8 *p_buff, int i_size )
int AVI_SkipBytes( input_thread_t *p_input, int i_count ) int AVI_SkipBytes( input_thread_t *p_input, int i_count )
{ {
/* broken with new use of i_tell */
#if 0
int i_buff_size; int i_buff_size;
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
i_buff_size = p_input->p_last_data - p_input->p_current_data; i_buff_size = p_input->p_last_data - p_input->p_current_data;
...@@ -186,6 +188,7 @@ int AVI_SkipBytes( input_thread_t *p_input, int i_count ) ...@@ -186,6 +188,7 @@ int AVI_SkipBytes( input_thread_t *p_input, int i_count )
return( 1 ); return( 1 );
} }
else else
#endif
{ {
return( AVI_SeekAbsolute( p_input, return( AVI_SeekAbsolute( p_input,
AVI_TellAbsolute( p_input ) + i_count ) ); AVI_TellAbsolute( p_input ) + i_count ) );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libioRIFF.c : AVI file Stream input module for vlc * libioRIFF.c : AVI file Stream input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: libioRIFF.c,v 1.3 2002/10/15 00:55:07 fenrir Exp $ * $Id: libioRIFF.c,v 1.4 2002/10/26 19:14:45 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -50,8 +50,8 @@ static inline u32 __EVEN( u32 i ) ...@@ -50,8 +50,8 @@ static inline u32 __EVEN( u32 i )
int __RIFF_TellPos( input_thread_t *p_input, u32 *pos ) int __RIFF_TellPos( input_thread_t *p_input, u32 *pos )
{ {
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
*pos= p_input->stream.p_selected_area->i_tell - *pos= p_input->stream.p_selected_area->i_tell;
( p_input->p_last_data - p_input->p_current_data ); // - ( p_input->p_last_data - p_input->p_current_data );
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
return 0; return 0;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libmp4.c : LibMP4 library for mp4 module for vlc * libmp4.c : LibMP4 library for mp4 module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: libmp4.c,v 1.7 2002/10/10 22:46:20 massiot Exp $ * $Id: libmp4.c,v 1.8 2002/10/26 19:14:45 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -210,8 +210,8 @@ off_t MP4_TellAbsolute( input_thread_t *p_input ) ...@@ -210,8 +210,8 @@ off_t MP4_TellAbsolute( input_thread_t *p_input )
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
i_pos= p_input->stream.p_selected_area->i_tell - i_pos= p_input->stream.p_selected_area->i_tell;
( p_input->p_last_data - p_input->p_current_data ); // ( p_input->p_last_data - p_input->p_current_data );
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* wav.c : wav file input module for vlc * wav.c : wav file input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: wav.c,v 1.1 2002/10/14 21:59:44 fenrir Exp $ * $Id: wav.c,v 1.2 2002/10/26 19:14:46 fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -84,8 +84,8 @@ static off_t TellAbsolute( input_thread_t *p_input ) ...@@ -84,8 +84,8 @@ static off_t TellAbsolute( input_thread_t *p_input )
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
i_pos= p_input->stream.p_selected_area->i_tell - i_pos= p_input->stream.p_selected_area->i_tell;
( p_input->p_last_data - p_input->p_current_data ); // - ( p_input->p_last_data - p_input->p_current_data );
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
......
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