aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-06-03 15:57:47 +0200
committerGravatar wm4 <wm4@nowhere>2014-06-03 15:58:25 +0200
commit35f87dc6923d94c53a04169ccb97556601e9e20b (patch)
tree0f5e5d567cbf5a76a8abcf93e9e852708a649c61 /audio
parentaf25e0aba8afa8e176b355a5795e11b13f0b9349 (diff)
audio/out/push: don't attempt to fill AO buffer when paused
Doing so will implicitly resume playback. Broken in commit 5929dc45.
Diffstat (limited to 'audio')
-rw-r--r--audio/out/push.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/audio/out/push.c b/audio/out/push.c
index 4c789ef3a1..e98d3e6abb 100644
--- a/audio/out/push.c
+++ b/audio/out/push.c
@@ -283,7 +283,8 @@ static void *playthread(void *arg)
struct ao_push_state *p = ao->api_priv;
pthread_mutex_lock(&p->lock);
while (!p->terminate) {
- ao_play_data(ao);
+ if (!p->paused)
+ ao_play_data(ao);
// Request new data from decoder if buffer goes below "full".
// Allow a small margin of missing data for AOs that use timeouts.
@@ -303,7 +304,7 @@ static void *playthread(void *arg)
if (!p->need_wakeup) {
MP_STATS(ao, "start audio wait");
- if (p->avoid_ao_wait) {
+ if (p->avoid_ao_wait || p->paused) {
// Avoid busy waiting, because the audio API will still report
// that it needs new data, even if we're not ready yet, or if
// get_space() decides that the amount of audio buffered in the