diff options
author | Magnus Holmgren <magnushol@gmail.com> | 2008-04-29 19:00:42 +0000 |
---|---|---|
committer | Magnus Holmgren <magnushol@gmail.com> | 2008-04-29 19:00:42 +0000 |
commit | bce419d89062e842b65353f942cb6624d861a2aa (patch) | |
tree | 62756958b3acaf499745b777cdf99f6bcc7a8035 /apps/codecs/wma.c | |
parent | 0e73b8a0a9d8a08d6078588a3402449d67219d8f (diff) |
Fix skipping back to the start of WMA files, broken by the addition of resume support. Not the most elegant fix perhaps, but it works for me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17291 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/wma.c')
-rw-r--r-- | apps/codecs/wma.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/codecs/wma.c b/apps/codecs/wma.c index 17d35bee52..6690db7dba 100644 --- a/apps/codecs/wma.c +++ b/apps/codecs/wma.c @@ -481,7 +481,7 @@ next_track: /* Remember the resume position - when the codec is opened, the playback engine will reset it. */ resume_offset = ci->id3->offset; - +restart_track: if (codec_init()) { LOGF("WMA: Error initialising codec\n"); retval = CODEC_ERROR; @@ -516,6 +516,7 @@ next_track: elapsedtime = 0; } + resume_offset = 0; ci->configure(DSP_SWITCH_FREQUENCY, wfx.rate); ci->configure(DSP_SET_STEREO_MODE, wfx.channels == 1 ? STEREO_MONO : STEREO_INTERLEAVED); @@ -536,7 +537,7 @@ next_track: if (ci->seek_time == 1) { ci->seek_complete(); - goto next_track; /* Pretend you never saw this... */ + goto restart_track; /* Pretend you never saw this... */ } elapsedtime = seek(ci->seek_time, &wfx); |