diff options
author | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:07:38 +0000 |
---|---|---|
committer | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 06:07:38 +0000 |
commit | 91f64941d33a7d19e889466513b9da01bec6f3d7 (patch) | |
tree | 90a29990d3e34ea500f7531f015d943afd05cda9 /libavcodec/vorbis_enc.c | |
parent | b8d5b161ae31b840dea470a57e44a1e2542c038b (diff) | |
download | ffmpeg-91f64941d33a7d19e889466513b9da01bec6f3d7.tar.gz |
Original Commit: r55 | ods15 | 2006-09-24 13:54:43 +0300 (Sun, 24 Sep 2006) | 2 lines
bug fixes for residue with no books in all passes
Originally committed as revision 6461 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r-- | libavcodec/vorbis_enc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index 2c55d9e344..9fc5fa8737 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -480,7 +480,7 @@ static void put_residue_header(PutBitContext * pb, residue_t * rc) { for (i = 0; i < rc->classifications; i++) { int j; for (j = 0; j < 8; j++) - if (rc->books[i][j]) + if (rc->books[i][j] != -1) put_bits(pb, 8, rc->books[i][j]); } } @@ -708,6 +708,7 @@ static void residue_encode(venc_context_t * venc, residue_t * rc, PutBitContext int nbook = rc->books[classes[j][p]][pass]; codebook_t * book = &venc->codebooks[nbook]; float * buf = coeffs + samples*j + rc->begin + p*psize; + if (nbook == -1) continue; assert(rc->type == 0); assert(book->ndimentions == 1); |