[FFmpeg-cvslog] sonic: factorize tail_size
Michael Niedermayer
git at videolan.org
Tue Sep 18 17:54:16 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Sep 18 17:37:41 2012 +0200| [0b2ac679e20c46d7f1b999b3fa76e2f9601459c5] | committer: Michael Niedermayer
sonic: factorize tail_size
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b2ac679e20c46d7f1b999b3fa76e2f9601459c5
---
libavcodec/sonic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index d412d60..b7caf48 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -547,10 +547,10 @@ static av_cold int sonic_encode_init(AVCodecContext *avctx)
s->block_align = (int)(2048.0*s->samplerate/44100)/s->downsampling;
s->frame_size = s->channels*s->block_align*s->downsampling;
- s->tail = av_mallocz(4* s->num_taps*s->channels);
+ s->tail_size = s->num_taps*s->channels;
+ s->tail = av_mallocz(4 * s->tail_size);
if (!s->tail)
return -1;
- s->tail_size = s->num_taps*s->channels;
s->predictor_k = av_mallocz(4 * s->num_taps);
if (!s->predictor_k)
More information about the ffmpeg-cvslog
mailing list