diff --git a/apps/wps.c b/apps/wps.c index ca1d80fe28..d41413c179 100644 --- a/apps/wps.c +++ b/apps/wps.c @@ -391,7 +391,7 @@ static bool ffwd_rew(int button) case BUTTON_LEFT | BUTTON_REL: case BUTTON_RIGHT | BUTTON_REL: - mpeg_ff_rewind(ff_rewind_count); + mpeg_ff_rewind(id3->elapsed+ff_rewind_count); ff_rewind_count = 0; ff_rewind = false; if (paused) @@ -855,7 +855,7 @@ int wps_show(void) if (!paused) mpeg_pause(); - mpeg_ff_rewind(-(id3->elapsed)); + mpeg_ff_rewind(0); if (!paused) mpeg_resume(); diff --git a/firmware/export/mpeg.h b/firmware/export/mpeg.h index 9f266bf9e5..bdf65dd7a8 100644 --- a/firmware/export/mpeg.h +++ b/firmware/export/mpeg.h @@ -67,7 +67,7 @@ void mpeg_pause(void); void mpeg_resume(void); void mpeg_next(void); void mpeg_prev(void); -void mpeg_ff_rewind(int change); +void mpeg_ff_rewind(int newtime); void mpeg_flush_and_reload_tracks(void); void mpeg_sound_set(int setting, int value); int mpeg_sound_min(int setting); 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 }