summaryrefslogtreecommitdiff
path: root/libavcodec/vorbis_enc.c
diff options
context:
space:
mode:
authorOded Shimon <ods15@ods15.dyndns.org>2006-10-02 06:07:32 +0000
committerOded Shimon <ods15@ods15.dyndns.org>2006-10-02 06:07:32 +0000
commit4fb432e743cdfabfcf4ca73c06707e20f4d8fbfe (patch)
treec2f138b0ad2955335fd202b1a8474a80ed2e8a17 /libavcodec/vorbis_enc.c
parenta7849cc90ea18f7f1adc73eb22e25b0b697239b1 (diff)
Original Commit: r51 | ods15 | 2006-09-23 16:32:30 +0300 (Sat, 23 Sep 2006) | 2 lines
deobfuscate a bit Originally committed as revision 6458 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r--libavcodec/vorbis_enc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c
index d28abec270..a466519c68 100644
--- a/libavcodec/vorbis_enc.c
+++ b/libavcodec/vorbis_enc.c
@@ -189,7 +189,11 @@ static void ready_codebook(codebook_t * cb) {
cb_entry_t * e = &cb->entries[i];
int j = 0;
if (h[0]) h[0] = 0;
- else for (j = e->len; !h[j]; j--) assert(j);
+ else {
+ for (j = e->len; j; j--)
+ if (h[j]) break;
+ assert(j);
+ }
e->codeword = h[j];
h[j] = 0;
for (j++; j <= e->len; j++) h[j] = e->codeword | (1 << (j - 1));