Commit c5d61dbf authored by Francois Cartegnie's avatar Francois Cartegnie

codec: avcodec: assert provides no safety

refs #14649
parent 491bef0b
...@@ -313,6 +313,9 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block ) ...@@ -313,6 +313,9 @@ static block_t *DecodeAudio( decoder_t *p_dec, block_t **pp_block )
} }
assert( p_block->i_buffer >= (unsigned)used ); assert( p_block->i_buffer >= (unsigned)used );
if( used > p_block->i_buffer )
used = p_block->i_buffer;
p_block->p_buffer += used; p_block->p_buffer += used;
p_block->i_buffer -= used; p_block->i_buffer -= used;
} }
......
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