From dc8af759ce9134b8bcf905c65b1d2fd9b53ed4f5 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sun, 20 Jun 2010 13:02:31 +0000 Subject: 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 --- apps/codecs/libmusepack/mpc_demux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/codecs/libmusepack/mpc_demux.c') 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) { mpc_int_t buf_fpos = next_pos - d->r->tell(d->r) + d->bytes_total; // is desired byte position within lower and upper boundaries of buffer? - if (buf_fpos >= 0 && buf_fpos + min_bytes <= DEMUX_BUFFER_SIZE) { + if (buf_fpos >= 0 && buf_fpos + min_bytes <= d->bytes_total) { // desired bytes are available in current buffer d->bits_reader.buff += buf_fpos - (d->bits_reader.buff - d->buffer); d->bits_reader.count = 8 - (fpos & 7); -- cgit v1.2.3