test/DumpDecoderClient: convert static local to class attribute

This commit is contained in:
Max Kellermann 2018-02-17 08:32:16 +01:00
parent cc3c1f31d0
commit 6d01ee9284
2 changed files with 2 additions and 1 deletions

View File

@ -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);

View File

@ -32,6 +32,8 @@
class DumpDecoderClient final : public DecoderClient {
bool initialized = false;
uint16_t prev_kbit_rate = 0;
public:
Mutex mutex;
Cond cond;