diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-08-12 21:03:34 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2020-08-12 21:03:34 +0000 |
| commit | 7ef8d11baeaf1847ba7f1df5d858f8cffea9300d (patch) | |
| tree | a741fb49db8834efd4b46d760b89082547eb2a9d /src/plugins/Input/mpeg/decoder_mad.h | |
| parent | 6f301f5880f7efce76ed46e7b502830642b87370 (diff) | |
| download | qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.gz qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.tar.bz2 qmmp-7ef8d11baeaf1847ba7f1df5d858f8cffea9300d.zip | |
coding style fixes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@9470 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/mpeg/decoder_mad.h')
| -rw-r--r-- | src/plugins/Input/mpeg/decoder_mad.h | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/src/plugins/Input/mpeg/decoder_mad.h b/src/plugins/Input/mpeg/decoder_mad.h index bd986b80f..d8640634c 100644 --- a/src/plugins/Input/mpeg/decoder_mad.h +++ b/src/plugins/Input/mpeg/decoder_mad.h @@ -3,7 +3,7 @@ * * * Copyright (c) 2000-2001 Brad Hughes <bhughes@trolltech.com> * * Copyright (C) 2000-2004 Robert Leslie <rob@mars.org> * - * Copyright (C) 2009-2018 Ilya Kotov forkotov02@ya.ru * + * Copyright (C) 2009-2020 Ilya Kotov forkotov02@ya.ru * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -31,7 +31,7 @@ class DecoderMAD : public Decoder { public: - DecoderMAD(QIODevice *i); + explicit DecoderMAD(QIODevice *i); virtual ~DecoderMAD(); // standard decoder API @@ -61,36 +61,28 @@ private: bool findXingHeader(struct mad_bitptr, unsigned int bitlen); LameHeader *findLameHeader(struct mad_bitptr ptr, unsigned int bitlen); uint findID3v2(uchar *data, ulong size); - bool m_inited, m_eof; - qint64 m_totalTime; - int m_channels, m_skip_frames; - uint m_bitrate; - long m_freq, m_len; + + bool m_inited = false, m_eof = false; + qint64 m_totalTime = 0; + int m_channels = 0, m_skip_frames = 0; + uint m_bitrate = 0; + long m_freq = 0, m_len = 0; // file input buffer - char *m_input_buf; - qint64 m_input_bytes; + char *m_input_buf = nullptr; + qint64 m_input_bytes = 0; // MAD decoder //xing header struct XingHeader { - int flags; - unsigned long frames; - unsigned long bytes; - unsigned char toc[100]; - long scale; - LameHeader *lame; - - XingHeader() - { - flags = 0; - frames = 0; - bytes = 0; - scale = 0; - lame = nullptr; - } + int flags = 0; + unsigned long frames = 0; + unsigned long bytes = 0; + unsigned char toc[100] = { 0 }; + long scale = 0; + LameHeader *lame = nullptr; }; XingHeader m_xing; @@ -105,7 +97,7 @@ private: struct mad_stream m_stream; struct mad_frame m_frame; struct mad_synth m_synth; - qint64 m_skip_bytes, m_play_bytes; + qint64 m_skip_bytes = 0, m_play_bytes = -1; }; |
