summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-11-06 23:12:04 +0100
committerMax Kellermann <max@duempel.org>2013-11-06 23:51:17 +0100
commit8e7d6eb1518f87926b6d1c34b9ca48e4b5836198 (patch)
tree6f489aac5cad11c0f5628e0b137d12e2f90ef374 /src
parent5c18e4f114b90f94959fb165c75689148066c9b2 (diff)
DecoderInternal: wake up the player thread in _flush_chunk()
Merge duplicate code.
Diffstat (limited to 'src')
-rw-r--r--src/DecoderAPI.cxx4
-rw-r--r--src/DecoderInternal.cxx2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/DecoderAPI.cxx b/src/DecoderAPI.cxx
index aaa8bb17f..fbe4d98c0 100644
--- a/src/DecoderAPI.cxx
+++ b/src/DecoderAPI.cxx
@@ -312,7 +312,6 @@ do_send_tag(Decoder &decoder, const Tag &tag)
/* there is a partial chunk - flush it, we want the
tag in a new chunk */
decoder_flush_chunk(decoder);
- decoder.dc.client_cond.signal();
}
assert(decoder.chunk == nullptr);
@@ -422,7 +421,6 @@ decoder_data(Decoder &decoder,
if (dest.IsNull()) {
/* the chunk is full, flush it */
decoder_flush_chunk(decoder);
- dc.client_cond.signal();
continue;
}
@@ -442,7 +440,6 @@ decoder_data(Decoder &decoder,
if (full) {
/* the chunk is full, flush it */
decoder_flush_chunk(decoder);
- dc.client_cond.signal();
}
data = (const uint8_t *)data + nbytes;
@@ -535,7 +532,6 @@ decoder_replay_gain(Decoder &decoder,
replay gain values affect the following
samples */
decoder_flush_chunk(decoder);
- decoder.dc.client_cond.signal();
}
} else
decoder.replay_gain_serial = 0;
diff --git a/src/DecoderInternal.cxx b/src/DecoderInternal.cxx
index 92fa7c451..25d9c3f05 100644
--- a/src/DecoderInternal.cxx
+++ b/src/DecoderInternal.cxx
@@ -100,4 +100,6 @@ decoder_flush_chunk(Decoder &decoder)
dc.pipe->Push(decoder.chunk);
decoder.chunk = nullptr;
+
+ dc.client_cond.signal();
}