]> git.sesse.net Git - vlc/commitdiff
* all : fix for new use of p_selected_area->i_tell.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 26 Oct 2002 19:14:46 +0000 (19:14 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 26 Oct 2002 19:14:46 +0000 (19:14 +0000)
 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....

modules/demux/asf/libasf.c
modules/demux/avi/libavi.c
modules/demux/avi/libioRIFF.c
modules/demux/mp4/libmp4.c
modules/demux/wav/wav.c

index ef198bf67f508114878c5cda99adb1fc12ce0792..761d7d03373688d0d3c9fc277048d03e08e03c37 100644 (file)
@@ -2,7 +2,7 @@
  * libasf.c : 
  *****************************************************************************
  * 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>
  * 
  * 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 )
     
     vlc_mutex_lock( &p_input->stream.stream_lock );
     
-    i_pos= p_input->stream.p_selected_area->i_tell -
-            ( p_input->p_last_data - p_input->p_current_data  );
+    i_pos= p_input->stream.p_selected_area->i_tell;
+//           - ( p_input->p_last_data - p_input->p_current_data  );
 
     vlc_mutex_unlock( &p_input->stream.stream_lock );
 
index 1fe59e30129c6242ba50fb0aebe05364a677c9c9..c2e7a86a0e72dbd128745a2d732ebee935079f31 100644 (file)
@@ -2,7 +2,7 @@
  * libavi.c : 
  *****************************************************************************
  * 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>
  * 
  * 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 )
     
     vlc_mutex_lock( &p_input->stream.stream_lock );
     
-    i_pos= p_input->stream.p_selected_area->i_tell -
-            ( p_input->p_last_data - p_input->p_current_data  );
+    i_pos= p_input->stream.p_selected_area->i_tell;
+//            - ( p_input->p_last_data - p_input->p_current_data  );
 
     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 )
 
 int  AVI_SkipBytes( input_thread_t *p_input, int i_count )
 {
+    /* broken with new use of i_tell */
+#if 0
     int i_buff_size;
     vlc_mutex_lock( &p_input->stream.stream_lock );
     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 )
         return( 1 );
     }
     else
+#endif
     {
         return( AVI_SeekAbsolute( p_input, 
                               AVI_TellAbsolute( p_input ) + i_count ) );
index 72cc1705ed6ac207d9f2141467e9ded00f5aee3e..c14abe5a5d4dc00784e173fc48129c816259f7f2 100644 (file)
@@ -2,7 +2,7 @@
  * libioRIFF.c : AVI file Stream input module for vlc
  *****************************************************************************
  * 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>
  * 
  * This program is free software; you can redistribute it and/or modify
@@ -50,8 +50,8 @@ static inline u32 __EVEN( u32 i )
 int __RIFF_TellPos( input_thread_t *p_input, u32 *pos )
 { 
     vlc_mutex_lock( &p_input->stream.stream_lock );
-    *pos= p_input->stream.p_selected_area->i_tell - 
-            ( p_input->p_last_data - p_input->p_current_data  );
+    *pos= p_input->stream.p_selected_area->i_tell;
+//            - ( p_input->p_last_data - p_input->p_current_data  );
     vlc_mutex_unlock( &p_input->stream.stream_lock );
     return 0;
 }
index ca340618106892272bc46a5cdba802c1fbabfcb9..ea7d41915e8f739b737b6006ffe1b51e33cd032e 100644 (file)
@@ -2,7 +2,7 @@
  * libmp4.c : LibMP4 library for mp4 module for vlc
  *****************************************************************************
  * 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>
  * 
  * 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 )
     
     vlc_mutex_lock( &p_input->stream.stream_lock );
     
-    i_pos= p_input->stream.p_selected_area->i_tell -
-            ( p_input->p_last_data - p_input->p_current_data  );
+    i_pos= p_input->stream.p_selected_area->i_tell;
+//            ( p_input->p_last_data - p_input->p_current_data  );
 
     vlc_mutex_unlock( &p_input->stream.stream_lock );
 
index 356b13351ff106507ae4194e7a91dcc24a535471..69dbae880a059ca3a6e541406b7c15aa038ac54f 100644 (file)
@@ -2,7 +2,7 @@
  * wav.c : wav file input module for vlc
  *****************************************************************************
  * 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>
  * 
  * 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 )
     
     vlc_mutex_lock( &p_input->stream.stream_lock );
     
-    i_pos= p_input->stream.p_selected_area->i_tell -
-            ( p_input->p_last_data - p_input->p_current_data  );
+    i_pos= p_input->stream.p_selected_area->i_tell;
+//          - ( p_input->p_last_data - p_input->p_current_data  );
 
     vlc_mutex_unlock( &p_input->stream.stream_lock );