changeset 3847:9cf71c2ff770 libavcodec

Original Commit: r44 | ods15 | 2006-09-23 10:54:43 +0300 (Sat, 23 Sep 2006) | 2 lines some bug fixes for window()
author ods15
date Mon, 02 Oct 2006 05:56:37 +0000
parents afbeb215e56f
children 4d9aba494478
files vorbis_enc.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/vorbis_enc.c	Mon Oct 02 05:56:35 2006 +0000
+++ b/vorbis_enc.c	Mon Oct 02 05:56:37 2006 +0000
@@ -633,7 +633,7 @@
 
     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 @@
 
     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 {