[vlc-commits] Fix allocation size mismatch (cid #1047373)
Rémi Duraffort
git at videolan.org
Sat Jul 13 08:56:18 CEST 2013
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat Jul 13 08:52:03 2013 +0200| [9e4927fcb23f05fac7af9703d1ffb855b7258695] | committer: Rémi Duraffort
Fix allocation size mismatch (cid #1047373)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9e4927fcb23f05fac7af9703d1ffb855b7258695
---
modules/codec/flac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/codec/flac.c b/modules/codec/flac.c
index b964a27..b57c3a4 100644
--- a/modules/codec/flac.c
+++ b/modules/codec/flac.c
@@ -716,10 +716,10 @@ static block_t *Encode( encoder_t *p_enc, block_t *p_aout_buf )
p_sys->i_samples_delay += p_aout_buf->i_nb_samples;
/* Convert samples to FLAC__int32 */
- if( p_sys->i_buffer < p_aout_buf->i_buffer * 2 )
+ if( p_sys->i_buffer < p_aout_buf->i_buffer * sizeof(FLAC__int32) )
{
p_sys->p_buffer =
- xrealloc( p_sys->p_buffer, p_aout_buf->i_buffer * 2 );
+ xrealloc( p_sys->p_buffer, p_aout_buf->i_buffer * sizeof(FLAC__int32) );
p_sys->i_buffer = p_aout_buf->i_buffer * 2;
}
More information about the vlc-commits
mailing list