Mercurial > libavcodec.hg
comparison vorbis_enc.c @ 3851:a778f86c28e2 libavcodec
Original Commit: r49 | ods15 | 2006-09-23 12:52:21 +0300 (Sat, 23 Sep 2006) | 3 lines
fix off-by-one in both encoder and decoder.
libvorbis and tremor work now, ffvorbis still doesn't
author | ods15 |
---|---|
date | Mon, 02 Oct 2006 06:07:28 +0000 |
parents | c52f4698e851 |
children | d3bc8c09597c |
comparison
equal
deleted
inserted
replaced
3850:c52f4698e851 | 3851:a778f86c28e2 |
---|---|
387 if (i == cb->nentries) ordered = 1; | 387 if (i == cb->nentries) ordered = 1; |
388 | 388 |
389 put_bits(pb, 1, ordered); | 389 put_bits(pb, 1, ordered); |
390 if (ordered) { | 390 if (ordered) { |
391 int len = cb->entries[0].len; | 391 int len = cb->entries[0].len; |
392 put_bits(pb, 5, len); | 392 put_bits(pb, 5, len - 1); |
393 i = 0; | 393 i = 0; |
394 while (i < cb->nentries) { | 394 while (i < cb->nentries) { |
395 int j; | 395 int j; |
396 for (j = 0; j+i < cb->nentries; j++) if (cb->entries[j+i].len != len) break; | 396 for (j = 0; j+i < cb->nentries; j++) if (cb->entries[j+i].len != len) break; |
397 put_bits(pb, ilog(cb->nentries - i), j); | 397 put_bits(pb, ilog(cb->nentries - i), j); |