Remove the unused manager from block_t
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 26 Nov 2007 18:37:34 +0000 (18:37 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 26 Nov 2007 18:37:34 +0000 (18:37 +0000)
include/vlc_block.h
modules/access/screen/win32.c
src/misc/block.c

index b0c06dc..1e155ca 100644 (file)
@@ -100,10 +100,6 @@ struct block_t
      */
     void        (*pf_release)   ( block_t * );
 
-    /* It's an object that should be valid as long as the block_t is valid */
-    /* It should become a true block manager to reduce malloc/free */
-    vlc_object_t    *p_manager;
-
     /* Following fields are private, user should never touch it */
     /* XXX never touch that OK !!! the first that access that will
      * have Subversion account removed ;) XXX */
@@ -126,13 +122,13 @@ struct block_t
  *      and decrease are supported). Use it as it is optimised.
  * - block_Duplicate : create a copy of a block.
  ****************************************************************************/
-#define block_New( a, b ) __block_New( VLC_OBJECT(a), b )
+#define block_New( a, b ) __block_New( NULL, b )
 VLC_EXPORT( block_t *,  __block_New,        ( vlc_object_t *, size_t ) );
 VLC_EXPORT( block_t *, block_Realloc,       ( block_t *, ssize_t i_pre, size_t i_body ) );
 
 static inline block_t *block_Duplicate( block_t *p_block )
 {
-    block_t *p_dup = block_New( p_block->p_manager, p_block->i_buffer );
+    block_t *p_dup = block_New( NULL, p_block->i_buffer );
     if( p_dup == NULL )
         return NULL;
 
@@ -231,7 +227,7 @@ static inline block_t *block_ChainGather( block_t *p_list )
         i_length += b->i_length;
     }
 
-    g = block_New( p_list->p_manager, i_total );
+    g = block_New( NULL, i_total );
     block_ChainExtract( p_list, g->p_buffer, g->i_buffer );
 
     g->i_flags = p_list->i_flags;
index a3e5699..bf3125a 100644 (file)
@@ -214,7 +214,6 @@ static block_t *CaptureBlockNew( demux_t *p_demux )
     p_block->i_buffer       = i_buffer;
     p_block->p_buffer       = p_buffer;
     p_block->pf_release     = CaptureBlockRelease;
-    p_block->p_manager      = VLC_OBJECT( p_demux->p_libvlc );
     p_block->p_sys->hbmp    = hbmp;
 
     return p_block;
index 5bcdda3..c854ec1 100644 (file)
@@ -76,7 +76,6 @@ block_t *__block_New( vlc_object_t *p_obj, size_t i_size )
     p_block->pf_release     = BlockRelease;
 
     /* Is ok, as no comunication between p_vlc */
-    p_block->p_manager      = VLC_OBJECT( p_obj->p_libvlc );
     p_block->p_sys          = p_sys;
 
     return p_block;
@@ -123,7 +122,7 @@ block_t *block_Realloc( block_t *p_block, ssize_t i_prebody, size_t i_body )
 
     if( i_body > 0 || i_prebody > 0 )
     {
-        block_t *p_rea = block_New( p_block->p_manager, i_buffer_size );
+        block_t *p_rea = block_New( NULL, i_buffer_size );
 
         if( p_rea )
         {