From 4160b75456bc42adaa0857bf62fa89f01ba951d2 Mon Sep 17 00:00:00 2001 From: Hardeep Sidhu Date: Fri, 29 Aug 2003 04:36:35 +0000 Subject: Pass actual time instead of offset to mpeg_ff_rewind. Fixes ff/rew to wrong time when mpeg thread is busy loading data. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3943 a1c6a512-1295-4272-9138-f99709370657 --- firmware/mpeg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/mpeg.c') diff --git a/firmware/mpeg.c b/firmware/mpeg.c index ec5a8b3684..347e8ded21 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c @@ -1497,7 +1497,7 @@ static void mpeg_thread(void) case MPEG_FF_REWIND: { struct mp3entry *id3 = mpeg_current_track(); unsigned int oldtime = id3->elapsed; - unsigned int newtime = oldtime + (int)ev.data; + unsigned int newtime = (unsigned int)ev.data; int curpos, newpos, diffpos; DEBUGF("MPEG_FF_REWIND\n"); @@ -2450,12 +2450,12 @@ void mpeg_prev(void) #endif } -void mpeg_ff_rewind(int change) +void mpeg_ff_rewind(int newtime) { #ifndef SIMULATOR - queue_post(&mpeg_queue, MPEG_FF_REWIND, (void *)change); + queue_post(&mpeg_queue, MPEG_FF_REWIND, (void *)newtime); #else - (void)change; + (void)newtime; #endif } -- cgit v1.2.3