diff options
| author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-02 19:08:29 +0000 |
|---|---|---|
| committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2011-08-02 19:08:29 +0000 |
| commit | 7155be6ca49ee71f565c8d5e196e189540edf2c8 (patch) | |
| tree | 79ee549649559ea310f452631fe1d9132c5f0e94 /apps/codecs/libmusepack/mpc_bits_reader.c | |
| parent | 7bbd7daaf77aa78a1ed2fc7338841f1653d20530 (diff) | |
| download | rockbox-7155be6ca49ee71f565c8d5e196e189540edf2c8.zip rockbox-7155be6ca49ee71f565c8d5e196e189540edf2c8.tar.gz rockbox-7155be6ca49ee71f565c8d5e196e189540edf2c8.tar.bz2 rockbox-7155be6ca49ee71f565c8d5e196e189540edf2c8.tar.xz | |
Sync rockbox to r475 of musepack's svn.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30240 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmusepack/mpc_bits_reader.c')
| -rw-r--r-- | apps/codecs/libmusepack/mpc_bits_reader.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/codecs/libmusepack/mpc_bits_reader.c b/apps/codecs/libmusepack/mpc_bits_reader.c index 58b3f37..c917ad5 100644 --- a/apps/codecs/libmusepack/mpc_bits_reader.c +++ b/apps/codecs/libmusepack/mpc_bits_reader.c @@ -136,6 +136,8 @@ mpc_int32_t mpc_bits_golomb_dec(mpc_bits_reader * r, const mpc_uint_t k) mpc_uint32_t mpc_bits_log_dec(mpc_bits_reader * r, mpc_uint_t max) { mpc_uint32_t value = 0; + if (max == 0) + return 0; if (log2[max - 1] > 1) value = mpc_bits_read(r, log2[max - 1] - 1); if (value >= log2_lost[max - 1]) |