summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
authorMagnus Holmgren <magnushol@gmail.com>2011-02-01 20:17:42 +0000
committerMagnus Holmgren <magnushol@gmail.com>2011-02-01 20:17:42 +0000
commit11b7a4fb26ac65b196b9f3c23315f9cf5cb696b5 (patch)
treee143de24187c3b0af71fe27f2264b8519884e035 /apps/codecs
parentee6a74e7e3f0d4173eb4dad63f0f3c891f8732ed (diff)
Add a safety check in the resume seek code, just in case.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29181 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/libm4a/m4a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/codecs/libm4a/m4a.c b/apps/codecs/libm4a/m4a.c
index 7ff9dd2544..8c4b172bc2 100644
--- a/apps/codecs/libm4a/m4a.c
+++ b/apps/codecs/libm4a/m4a.c
@@ -362,7 +362,7 @@ unsigned int alac_seek_raw(demux_res_t* demux_res, stream_t* stream,
}
++chunk;
}
- new_pos = demux_res->chunk_offset[chunk-1];
+ new_pos = demux_res->chunk_offset[chunk > 0 ? chunk - 1 : 0];
/* Get the first sample of the chunk. */
i = 1;