Commit 864829ad authored by gbazin's avatar gbazin
Browse files

* include/vlc_block.h: block_Duplicate() needs to duplicate all the fields of block_t.

parent 7dd83af8
......@@ -119,6 +119,13 @@ static inline block_t *block_Duplicate( block_t *p_block )
{
block_t *p_dup = block_New( p_block->p_manager, p_block->i_buffer );
p_dup->i_dts = p_block->i_dts;
p_dup->i_pts = p_block->i_pts;
p_dup->i_flags = p_block->i_flags;
p_dup->i_length = p_block->i_length;
p_dup->i_rate = p_block->i_rate;
p_dup->i_samples = p_block->i_samples;
if( p_dup && p_block->i_buffer > 0 )
memcpy( p_dup->p_buffer, p_block->p_buffer, p_block->i_buffer );
......
......@@ -119,11 +119,12 @@ block_t *block_Realloc( block_t *p_block, int i_prebody, int i_body )
{
block_t *p_rea = block_New( p_block->p_manager, i_buffer_size );
p_rea->i_dts = p_block->i_dts;
p_rea->i_pts = p_block->i_pts;
p_rea->i_flags = p_block->i_flags;
p_rea->i_length= p_block->i_length;
p_rea->i_rate = p_block->i_rate;
p_rea->i_dts = p_block->i_dts;
p_rea->i_pts = p_block->i_pts;
p_rea->i_flags = p_block->i_flags;
p_rea->i_length = p_block->i_length;
p_rea->i_rate = p_block->i_rate;
p_rea->i_samples = p_block->i_samples;
memcpy( p_rea->p_buffer + i_prebody, p_block->p_buffer,
__MIN( p_block->i_buffer, p_rea->i_buffer - i_prebody ) );
......
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