diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2011-02-01 20:17:42 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2011-02-01 20:17:42 +0000 |
commit | 11b7a4fb26ac65b196b9f3c23315f9cf5cb696b5 (patch) | |
tree | e143de24187c3b0af71fe27f2264b8519884e035 | |
parent | ee6a74e7e3f0d4173eb4dad63f0f3c891f8732ed (diff) | |
download | rockbox-11b7a4fb26ac65b196b9f3c23315f9cf5cb696b5.tar.gz rockbox-11b7a4fb26ac65b196b9f3c23315f9cf5cb696b5.zip |
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
-rw-r--r-- | apps/codecs/libm4a/m4a.c | 2 |
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, | |||
362 | } | 362 | } |
363 | ++chunk; | 363 | ++chunk; |
364 | } | 364 | } |
365 | new_pos = demux_res->chunk_offset[chunk-1]; | 365 | new_pos = demux_res->chunk_offset[chunk > 0 ? chunk - 1 : 0]; |
366 | 366 | ||
367 | /* Get the first sample of the chunk. */ | 367 | /* Get the first sample of the chunk. */ |
368 | i = 1; | 368 | i = 1; |