Commit 5f1f8253 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: ignore audio output buffer padding (fixes #8513)

libavcodec may request more buffer space than it really needs for
alignment.
parent f952b888
......@@ -341,9 +341,9 @@ block_t * DecodeAudio ( decoder_t *p_dec, block_t **pp_block )
block_t *p_buffer = decoder_NewAudioBuffer( p_dec, p_block->i_nb_samples );
if (!p_buffer)
return NULL;
assert( p_block->i_nb_samples >= (unsigned)frame.nb_samples );
assert( p_buffer->i_buffer >= p_block->i_buffer );
assert( p_block->i_nb_samples == p_buffer->i_nb_samples );
p_block->i_buffer = p_buffer->i_buffer; /* drop buffer padding */
/* Interleave audio if required */
if( av_sample_fmt_is_planar( ctx->sample_fmt ) )
......
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