Commit e7311ac2 authored by Max Kellermann's avatar Max Kellermann

decoder/opus: use C++11 initializers

parent 8d9ecc0c
...@@ -76,8 +76,8 @@ class MPDOpusDecoder { ...@@ -76,8 +76,8 @@ class MPDOpusDecoder {
ogg_stream_state os; ogg_stream_state os;
OpusDecoder *opus_decoder; OpusDecoder *opus_decoder = nullptr;
opus_int16 *output_buffer; opus_int16 *output_buffer = nullptr;
/** /**
* If non-zero, then a previous Opus stream has been found * If non-zero, then a previous Opus stream has been found
...@@ -85,9 +85,9 @@ class MPDOpusDecoder { ...@@ -85,9 +85,9 @@ class MPDOpusDecoder {
* nullptr, then its end-of-stream packet has been found * nullptr, then its end-of-stream packet has been found
* already. * already.
*/ */
unsigned previous_channels; unsigned previous_channels = 0;
bool os_initialized; bool os_initialized = false;
int opus_serialno; int opus_serialno;
...@@ -98,11 +98,7 @@ class MPDOpusDecoder { ...@@ -98,11 +98,7 @@ class MPDOpusDecoder {
public: public:
MPDOpusDecoder(Decoder &_decoder, MPDOpusDecoder(Decoder &_decoder,
InputStream &_input_stream) InputStream &_input_stream)
:decoder(_decoder), input_stream(_input_stream), :decoder(_decoder), input_stream(_input_stream) {}
opus_decoder(nullptr),
output_buffer(nullptr),
previous_channels(0),
os_initialized(false) {}
~MPDOpusDecoder(); ~MPDOpusDecoder();
bool ReadFirstPage(OggSyncState &oy); bool ReadFirstPage(OggSyncState &oy);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment