aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vorbis_enc.c
diff options
context:
space:
mode:
authorOded Shimon <ods15@ods15.dyndns.org>2006-10-02 05:56:37 +0000
committerOded Shimon <ods15@ods15.dyndns.org>2006-10-02 05:56:37 +0000
commitf4e5e657b81fd39fc2ca9b24a03d2353bdcba3b1 (patch)
tree1065108315ed6b46f39080b51f9b1b251a6a4c9d /libavcodec/vorbis_enc.c
parent19b00cf16e286f8e8d86051ab008b3385d28f8e7 (diff)
downloadffmpeg-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.c5
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 {