diff options
author | Laszlo Papp <lpapp@kde.org> | 2011-12-06 12:40:34 +0200 |
---|---|---|
committer | Laszlo Papp <ext-laszlo.papp@nokia.com> | 2011-12-06 12:40:34 +0200 |
commit | 1ac2ab385e50e89a08bfd2ea78385ad29cb660ce (patch) | |
tree | 85e6ef92c9e91148250328dd51d180a063ed5452 | |
parent | c460074d90695dcc8b9876bc22b9ec12e1ec199c (diff) |
Use a private class member for the bitStream and initialize it to zero
-rw-r--r-- | src/qalvorbisfileaudiodecoder.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/qalvorbisfileaudiodecoder.cpp b/src/qalvorbisfileaudiodecoder.cpp index ba62147..6d13a79 100644 --- a/src/qalvorbisfileaudiodecoder.cpp +++ b/src/qalvorbisfileaudiodecoder.cpp @@ -30,6 +30,7 @@ class QALVorbisFileAudioDecoder::Private { public: Private() + : bitStream(0) { } @@ -48,6 +49,8 @@ class QALVorbisFileAudioDecoder::Private QByteArray encodedData; OggVorbis_File *oggVorbisFile; vorbis_info vorbisInfo; + + int bitStream; }; int @@ -223,11 +226,9 @@ QALVorbisFileAudioDecoder::decode(qint64 maxlen) qint64 QALVorbisFileAudioDecoder::decode(char *decodedData, qint64 maxlen) { - int bitStream; - #if Q_BYTE_ORDER == Q_BIG_ENDIAN - return ov_read(d->oggVorbisFile, decodedData, maxlen, 1, 2, 1, &bitStream); + return ov_read(d->oggVorbisFile, decodedData, maxlen, 1, 2, 1, &d->bitStream); #elif Q_BYTE_ORDER == Q_LITTLE_ENDIAN - return ov_read(d->oggVorbisFile, decodedData, maxlen, 0, 2, 1, &bitStream); + return ov_read(d->oggVorbisFile, decodedData, maxlen, 0, 2, 1, &d->bitStream); #endif } |