diff options
author | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:08:39 +0000 |
---|---|---|
committer | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:08:39 +0000 |
commit | 0e9bf4a2960ebebad2b5f8a1a0d5e40d14899b9e (patch) | |
tree | 0d7709f4554d216c92fb3aca72540875a4fd0af5 /libavcodec/vorbis_enc.c | |
parent | 7f44dfe264d8778c7bd617678474efa0097bdea2 (diff) | |
download | ffmpeg-0e9bf4a2960ebebad2b5f8a1a0d5e40d14899b9e.tar.gz |
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
Originally committed as revision 6487 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-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 514ef976db..5cded20b82 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -923,13 +923,13 @@ static float * put_vector(codebook_t * book, PutBitContext * pb, float * num) { 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; |