From 15944f4cc823444506e01dd47ac0c58e1a55d2f2 Mon Sep 17 00:00:00 2001 From: Buschel Date: Mon, 31 Jan 2011 15:18:26 +0000 Subject: [PATCH] Fix resume for m4a files. Solves FS#9306. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29175 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libm4a/m4a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/codecs/libm4a/m4a.c b/apps/codecs/libm4a/m4a.c index 42295e76ee..62b15c0fcf 100644 --- a/apps/codecs/libm4a/m4a.c +++ b/apps/codecs/libm4a/m4a.c @@ -368,7 +368,7 @@ unsigned int alac_seek_raw(demux_res_t* demux_res, stream_t* stream, /* Locate the chunk containing file_loc. */ for (i = 0; i < demux_res->num_chunk_offsets && - file_loc < demux_res->chunk_offset[i]; i++) + file_loc > demux_res->chunk_offset[i]; i++) { } @@ -378,7 +378,7 @@ unsigned int alac_seek_raw(demux_res_t* demux_res, stream_t* stream, /* Get the first sample of the chunk. */ for (i = 1; i < demux_res->num_sample_to_chunks && - chunk < demux_res->sample_to_chunk[i - 1].first_chunk; i++) + chunk > demux_res->sample_to_chunk[i - 1].first_chunk; i++) { chunk_sample += demux_res->sample_to_chunk[i - 1].num_samples * (demux_res->sample_to_chunk[i].first_chunk - -- 2.11.4.GIT