summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-02-17 08:31:19 +0100
committerMax Kellermann <max@musicpd.org>2018-02-17 08:31:19 +0100
commitcc3c1f31d018aa0bd6b55a5f7444a209de83e92a (patch)
treed184cff99cd458d1809443ce539f4a24988d920a /test
parent5909502a13a2c25595108fcb4d2757b3530f0431 (diff)
test/DumpDecoderClient: convert to class
Diffstat (limited to 'test')
-rw-r--r--test/DumpDecoderClient.hxx9
-rw-r--r--test/run_decoder.cxx2
2 files changed, 8 insertions, 3 deletions
diff --git a/test/DumpDecoderClient.hxx b/test/DumpDecoderClient.hxx
index 909127d56..3235d233b 100644
--- a/test/DumpDecoderClient.hxx
+++ b/test/DumpDecoderClient.hxx
@@ -29,11 +29,16 @@
* A #DecoderClient implementation which dumps metadata to stderr and
* decoded data to stdout.
*/
-struct DumpDecoderClient final : DecoderClient {
+class DumpDecoderClient final : public DecoderClient {
+ bool initialized = false;
+
+public:
Mutex mutex;
Cond cond;
- bool initialized = false;
+ bool IsInitialized() const noexcept {
+ return initialized;
+ }
/* virtual methods from DecoderClient */
void Ready(AudioFormat audio_format,
diff --git a/test/run_decoder.cxx b/test/run_decoder.cxx
index c4d47c804..536b3b45d 100644
--- a/test/run_decoder.cxx
+++ b/test/run_decoder.cxx
@@ -131,7 +131,7 @@ try {
return EXIT_FAILURE;
}
- if (!client.initialized) {
+ if (!client.IsInitialized()) {
fprintf(stderr, "Decoding failed\n");
return EXIT_FAILURE;
}