[SCM] libgroove/upstream: player: reset play_head and play_pos on flush
andrewrk-guest at users.alioth.debian.org
andrewrk-guest at users.alioth.debian.org
Tue Jun 3 17:46:01 UTC 2014
The following commit has been merged in the upstream branch:
commit d76878e0e6603aceaa6ad69d44dab96a9eaf9044
Author: Andrew Kelley <superjoe30 at gmail.com>
Date: Sun Jun 1 14:46:05 2014 -0700
player: reset play_head and play_pos on flush
This fixes a race condition where seeking to a different playlist item and
then back would have a window of time where it could report the wrong
position.
diff --git a/grooveplayer/player.c b/grooveplayer/player.c
index 4d6c85f..9740907 100644
--- a/grooveplayer/player.c
+++ b/grooveplayer/player.c
@@ -282,6 +282,8 @@ static void sink_flush(struct GrooveSink *sink) {
p->audio_buf_size = 0;
p->start_nanos = now_nanos();
p->frames_consumed = 0;
+ p->play_pos = -1.0;
+ p->play_head = NULL;
pthread_mutex_unlock(&p->play_head_mutex);
}
--
libgroove packaging
More information about the pkg-multimedia-commits
mailing list