summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-08-15 20:39:08 +0200
committerGravatar waker <wakeroid@gmail.com>2009-08-15 20:39:08 +0200
commit8a018c992918557d22b243ace4128255e1ad2566 (patch)
treef9ee79be64554b421f3c0b3d2440ea4d350a1477
parent376d8d6c9e2f9f1f2956c0cec3d401e6c40b7e5b (diff)
fixed bug when seeking to 0s in mp3 led to jump to next track
-rw-r--r--cmp3.c4
-rw-r--r--main.c1
-rw-r--r--streamer.c1
3 files changed, 6 insertions, 0 deletions
diff --git a/cmp3.c b/cmp3.c
index 0e5ecc6e..d60bfbb0 100644
--- a/cmp3.c
+++ b/cmp3.c
@@ -619,6 +619,10 @@ cmp3_seek (float time) {
mad_synth_init(&synth);
mad_timer_reset(&buffer.timer);
+ if (time == 0) {
+ return 0;
+ }
+
if (cmp3_scan_stream (&buffer, time) == -1) {
return -1;
}
diff --git a/main.c b/main.c
index 08751a0e..20ffc080 100644
--- a/main.c
+++ b/main.c
@@ -235,6 +235,7 @@ main (int argc, char *argv[]) {
gtk_init (&argc, &argv);
gtkpl_init ();
+
pl_load (defpl);
mainwin = create_mainwin ();
searchwin = create_searchwin ();
diff --git a/streamer.c b/streamer.c
index 297f0ff5..cf0fd03a 100644
--- a/streamer.c
+++ b/streamer.c
@@ -55,6 +55,7 @@ streamer_set_nextsong (int song, int pstate) {
void
streamer_set_seek (float pos) {
+ printf ("seeking to %d\n", pos);
seekpos = pos;
}