[vlc-commits] avcodec: ignore audio output buffer padding (fixes #8513)
Rémi Denis-Courmont
git at videolan.org
Sat Apr 27 18:41:54 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 27 19:39:29 2013 +0300| [5f1f8253748eb3faf13c3fe5b225ca9c97a617dd] | committer: Rémi Denis-Courmont
avcodec: ignore audio output buffer padding (fixes #8513)
libavcodec may request more buffer space than it really needs for
alignment.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f1f8253748eb3faf13c3fe5b225ca9c97a617dd
---
modules/codec/avcodec/audio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/avcodec/audio.c b/modules/codec/avcodec/audio.c
index bf63157..2dd3a7b 100644
--- a/modules/codec/avcodec/audio.c
+++ b/modules/codec/avcodec/audio.c
@@ -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 ) )
More information about the vlc-commits
mailing list