[vlc-commits] avcodec: give right buffer size not the smallest one

Ilkka Ollakka git at videolan.org
Sat Nov 9 18:20:26 CET 2013


vlc/vlc-2.1 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Nov  3 12:30:22 2013 +0200| [4502edc3466b0b2dc806571f895c8c3a346bf112] | committer: Jean-Baptiste Kempf

avcodec: give right buffer size not the smallest one

(cherry picked from commit 541705d141d17699726ba0c6bbc7d43e2b76b0f4)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=4502edc3466b0b2dc806571f895c8c3a346bf112
---

 modules/codec/avcodec/encoder.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index fea16c3..d88b2db 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1295,7 +1295,7 @@ static block_t *EncodeAudio( encoder_t *p_enc, block_t *p_aout_buf )
         if( avcodec_fill_audio_frame( p_sys->frame, p_sys->p_context->channels,
                                     p_sys->p_context->sample_fmt,
                                     p_sys->b_planar ? p_sys->p_buffer : p_aout_buf->p_buffer,
-                                    __MIN(p_sys->i_buffer_out, p_aout_buf->i_buffer),
+                                    p_sys->b_planar ? p_sys->i_buffer_out : p_aout_buf->i_buffer,
                                     align) < 0 )
         {
                  msg_Err( p_enc, "filling error on encode" );



More information about the vlc-commits mailing list