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

Ilkka Ollakka git at videolan.org
Sun Nov 3 11:35:39 CET 2013


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun Nov  3 12:30:22 2013 +0200| [541705d141d17699726ba0c6bbc7d43e2b76b0f4] | committer: Ilkka Ollakka

avcodec: give right buffer size not the smallest one

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=541705d141d17699726ba0c6bbc7d43e2b76b0f4
---

 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 cd04ad9..0585bce 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -1299,7 +1299,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