From 6d01ee92842d03796a5fad3052c707d7c7557fdf Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 17 Feb 2018 08:32:16 +0100 Subject: [PATCH] test/DumpDecoderClient: convert static local to class attribute --- test/DumpDecoderClient.cxx | 1 - test/DumpDecoderClient.hxx | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/DumpDecoderClient.cxx b/test/DumpDecoderClient.cxx index a007e0b5c..680761bb8 100644 --- a/test/DumpDecoderClient.cxx +++ b/test/DumpDecoderClient.cxx @@ -96,7 +96,6 @@ DumpDecoderClient::SubmitData(gcc_unused InputStream *is, const void *data, size_t datalen, gcc_unused uint16_t kbit_rate) { - static uint16_t prev_kbit_rate; if (kbit_rate != prev_kbit_rate) { prev_kbit_rate = kbit_rate; fprintf(stderr, "%u kbit/s\n", kbit_rate); diff --git a/test/DumpDecoderClient.hxx b/test/DumpDecoderClient.hxx index 3235d233b..0fcb9754c 100644 --- a/test/DumpDecoderClient.hxx +++ b/test/DumpDecoderClient.hxx @@ -32,6 +32,8 @@ class DumpDecoderClient final : public DecoderClient { bool initialized = false; + uint16_t prev_kbit_rate = 0; + public: Mutex mutex; Cond cond;