Commit e7d96b48 authored by Christophe Massiot's avatar Christophe Massiot

* Fixed a structural major bug in the macroblock structure management.

parent 592b1bd4
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* video_fifo.h : FIFO for the pool of video_decoders * video_fifo.h : FIFO for the pool of video_decoders
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: video_fifo.h,v 1.3 2000/12/23 03:10:59 sam Exp $ * $Id: video_fifo.h,v 1.4 2001/02/23 14:07:25 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -244,6 +244,25 @@ static __inline__ void vpar_DestroyMacroblock( video_fifo_t * p_fifo, ...@@ -244,6 +244,25 @@ static __inline__ void vpar_DestroyMacroblock( video_fifo_t * p_fifo,
#endif #endif
} }
/*****************************************************************************
* vpar_FreeMacroblock : destroy a macroblock in case of error, without
* updating the macroblock counters
*****************************************************************************/
static __inline__ void vpar_FreeMacroblock( video_fifo_t * p_fifo,
macroblock_t * p_mb )
{
#ifdef VDEC_SMP
/* Release the macroblock_t structure */
#define P_buffer p_fifo->p_vpar->vbuffer
vlc_mutex_lock( &P_buffer.lock );
P_buffer.pp_mb_free[ ++P_buffer.i_index ] = p_mb;
vlc_mutex_unlock( &P_buffer.lock );
#undef P_buffer
#else
;
#endif
}
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vpar_blocks.c : blocks parsing * vpar_blocks.c : blocks parsing
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: vpar_blocks.c,v 1.77 2001/02/19 19:08:59 massiot Exp $ * $Id: vpar_blocks.c,v 1.78 2001/02/23 14:07:25 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Jean-Marc Dressler <polux@via.ecp.fr> * Jean-Marc Dressler <polux@via.ecp.fr>
...@@ -1769,7 +1769,7 @@ if( p_vpar->picture.b_error ) \ ...@@ -1769,7 +1769,7 @@ if( p_vpar->picture.b_error ) \
/* Mark this block as skipped (better than green blocks), and \ /* Mark this block as skipped (better than green blocks), and \
* go to the next slice. */ \ * go to the next slice. */ \
(*pi_mb_address)--; \ (*pi_mb_address)--; \
vpar_DestroyMacroblock( &p_vpar->vfifo, p_mb ); \ vpar_FreeMacroblock( &p_vpar->vfifo, p_mb ); \
return; \ return; \
} }
...@@ -1972,7 +1972,7 @@ static __inline__ void ParseMacroblock( ...@@ -1972,7 +1972,7 @@ static __inline__ void ParseMacroblock(
/* Mark this block as skipped (better than green blocks), and go /* Mark this block as skipped (better than green blocks), and go
* to the next slice. */ * to the next slice. */
(*pi_mb_address)--; (*pi_mb_address)--;
vpar_DestroyMacroblock( &p_vpar->vfifo, p_mb ); vpar_FreeMacroblock( &p_vpar->vfifo, p_mb );
} }
} }
......
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