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
This commit is contained in:
parent
20ac4a281a
commit
4160b75456
3 changed files with 7 additions and 7 deletions
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue