test/FakeDecoderAPI: dump bit rate

This commit is contained in:
Max Kellermann 2014-11-10 09:00:38 +01:00
parent ff6f1655f0
commit 2e47cb12c4

View File

@ -132,6 +132,12 @@ decoder_data(gcc_unused Decoder &decoder,
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);
}
gcc_unused ssize_t nbytes = write(1, data, datalen);
return DecoderCommand::NONE;
}