diff options
author | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 05:56:37 +0000 |
---|---|---|
committer | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 05:56:37 +0000 |
commit | f4e5e657b81fd39fc2ca9b24a03d2353bdcba3b1 (patch) | |
tree | 1065108315ed6b46f39080b51f9b1b251a6a4c9d /libavcodec/vorbis_enc.c | |
parent | 19b00cf16e286f8e8d86051ab008b3385d28f8e7 (diff) | |
download | ffmpeg-f4e5e657b81fd39fc2ca9b24a03d2353bdcba3b1.tar.gz |
Original Commit: r44 | ods15 | 2006-09-23 10:54:43 +0300 (Sat, 23 Sep 2006) | 2 lines
some bug fixes for window()
Originally committed as revision 6452 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r-- | libavcodec/vorbis_enc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index bc4bef24f1..7f918e6409 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -633,7 +633,7 @@ static int window(venc_context_t * venc, signed short * audio, int samples) { if (samples) { for (channel = 0; channel < venc->channels; channel++) { - float * offset = venc->saved + channel*window_len*2 + window_len; + float * offset = venc->samples + channel*window_len*2 + window_len; j = channel; for (i = 0; i < samples; i++, j += venc->channels) offset[i] = audio[j] / 32768. * win[window_len - i]; @@ -650,9 +650,10 @@ static int window(venc_context_t * venc, signed short * audio, int samples) { if (samples) { for (channel = 0; channel < venc->channels; channel++) { + float * offset = venc->saved + channel*window_len; j = channel; for (i = 0; i < samples; i++, j += venc->channels) - venc->saved[i] = audio[j] / 32768. * win[i]; + offset[i] = audio[j] / 32768. * win[i]; } venc->have_saved = 1; } else { |