[vlc-commits] avcodec: ignore audio output buffer padding (fixes #8513)

Rémi Denis-Courmont git at videolan.org
Sat Apr 27 18:40:48 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 27 19:39:29 2013 +0300| [724b0cbcb622fd084296301fdaaeb2c3c9611473] | 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=724b0cbcb622fd084296301fdaaeb2c3c9611473
---

 modules/codec/avcodec/audio.c |    4 ++--
 share/lua/intf/http.lua       |    2 +-
 2 files changed, 3 insertions(+), 3 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 ) )
diff --git a/share/lua/intf/http.lua b/share/lua/intf/http.lua
index f428a7f..0f6efb0 100644
--- a/share/lua/intf/http.lua
+++ b/share/lua/intf/http.lua
@@ -320,7 +320,7 @@ if config.host then
 end
 
 password = vlc.var.inherit(nil,"http-password")
-assert(password ~= "", "password not defined")
+-- assert(password ~= "", "password not defined")
 
 h = vlc.httpd()
 load_dir( http_dir )



More information about the vlc-commits mailing list