diff options
author | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:08:01 +0000 |
---|---|---|
committer | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:08:01 +0000 |
commit | af1cb7ee4c6fb68904e94dc4cf243ba26b3cbb47 (patch) | |
tree | ba2f42caced2e9929154389b934c8cc428b22a8f | |
parent | cbb834afa1dba062f4c32c9a6fd44c2e472d6f0e (diff) |
Original Commit: r67 | ods15 | 2006-09-25 20:33:06 +0300 (Mon, 25 Sep 2006) | 2 lines
horrible off-by-one causing lots of troubles...
Originally committed as revision 6472 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/vorbis_enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index 73598cd517..7c849a7ae6 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -847,7 +847,7 @@ static int window(venc_context_t * venc, signed short * audio, int samples) { 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] / n; + offset[i] = audio[j] / 32768. / n * win[window_len - i - 1]; } } else { for (channel = 0; channel < venc->channels; channel++) { @@ -864,7 +864,7 @@ static int window(venc_context_t * venc, signed short * audio, int samples) { float * offset = venc->saved + channel*window_len; j = channel; for (i = 0; i < samples; i++, j += venc->channels) - offset[i] = audio[j] / 32768. * win[i] / n; + offset[i] = audio[j] / 32768. / n * win[i]; } venc->have_saved = 1; } else { |