summaryrefslogtreecommitdiff
path: root/apps/codecs/libmusepack/mpc_demux.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-06-20 13:02:31 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-06-20 13:02:31 +0000
commitdc8af759ce9134b8bcf905c65b1d2fd9b53ed4f5 (patch)
treee4c02f5f5bc148d821996ef2d980f121dcfd0aea /apps/codecs/libmusepack/mpc_demux.c
parent64d4ddf2161f21239539a17705d83478297254f8 (diff)
downloadrockbox-dc8af759ce9134b8bcf905c65b1d2fd9b53ed4f5.tar.gz
rockbox-dc8af759ce9134b8bcf905c65b1d2fd9b53ed4f5.zip
Fix FS#11416. Resuming mpc was broken since r26032 due to false assumption of amount of buffered data.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26990 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmusepack/mpc_demux.c')
-rw-r--r--apps/codecs/libmusepack/mpc_demux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/codecs/libmusepack/mpc_demux.c b/apps/codecs/libmusepack/mpc_demux.c
index e74e420b0d..70ac3bd416 100644
--- a/apps/codecs/libmusepack/mpc_demux.c
+++ b/apps/codecs/libmusepack/mpc_demux.c
@@ -128,7 +128,7 @@ mpc_demux_seek(mpc_demux * d, mpc_seek_t fpos, mpc_uint32_t min_bytes) {
128 mpc_int_t buf_fpos = next_pos - d->r->tell(d->r) + d->bytes_total; 128 mpc_int_t buf_fpos = next_pos - d->r->tell(d->r) + d->bytes_total;
129 129
130 // is desired byte position within lower and upper boundaries of buffer? 130 // is desired byte position within lower and upper boundaries of buffer?
131 if (buf_fpos >= 0 && buf_fpos + min_bytes <= DEMUX_BUFFER_SIZE) { 131 if (buf_fpos >= 0 && buf_fpos + min_bytes <= d->bytes_total) {
132 // desired bytes are available in current buffer 132 // desired bytes are available in current buffer
133 d->bits_reader.buff += buf_fpos - (d->bits_reader.buff - d->buffer); 133 d->bits_reader.buff += buf_fpos - (d->bits_reader.buff - d->buffer);
134 d->bits_reader.count = 8 - (fpos & 7); 134 d->bits_reader.count = 8 - (fpos & 7);