Mercurial > libavcodec.hg
changeset 3882:6c03e983f866 libavcodec
Original Commit: r82 | ods15 | 2006-09-29 21:03:43 +0300 (Fri, 29 Sep 2006) | 2 lines
fix channels to be correct for rc->type==2 before classes[] decleration
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 06:08:39 +0000 |
parents | b272797e8149 |
children | 6d15c93bce65 |
files | vorbis_enc.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/vorbis_enc.c Mon Oct 02 06:08:36 2006 +0000 +++ b/vorbis_enc.c Mon Oct 02 06:08:39 2006 +0000 @@ -923,13 +923,13 @@ return &book->dimentions[entry * book->ndimentions]; } -static void residue_encode(venc_context_t * venc, residue_t * rc, PutBitContext * pb, float * coeffs, int samples, int channels) { +static void residue_encode(venc_context_t * venc, residue_t * rc, PutBitContext * pb, float * coeffs, int samples, int real_ch) { int pass, i, j, p, k; int psize = rc->partition_size; int partitions = (rc->end - rc->begin) / psize; + int channels = (rc->type == 2) ? 1 : real_ch; int classes[channels][partitions]; int classwords = venc->codebooks[rc->classbook].ndimentions; - int real_ch = channels; if (rc->type == 2) channels = 1;