Commit 93392b97 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Backport [18616]

parent 158d2d92
......@@ -129,6 +129,8 @@ VLC_EXPORT( block_t *, block_Realloc, ( block_t *, int i_pre, int 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 );
if( p_dup == NULL )
return NULL;
p_dup->i_dts = p_block->i_dts;
p_dup->i_pts = p_block->i_pts;
......@@ -136,8 +138,6 @@ static inline block_t *block_Duplicate( block_t *p_block )
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 );
return p_dup;
......
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