Update plugins/opusCodec/src/OpusDecoder.cpp

Co-Authored-By: Thijs Wenker <me@thoys.nl>
This commit is contained in:
Marcus Llewellyn 2020-01-15 13:06:42 -06:00 committed by GitHub
parent 0a3dfdefce
commit d96da21dd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -110,7 +110,7 @@ void AthenaOpusDecoder::lostFrame(QByteArray &decodedBuffer)
int buffer_size = AudioConstants::NETWORK_FRAME_SAMPLES_PER_CHANNEL * static_cast<int>(sizeof(int16_t))
* _opus_num_channels;
decodedBuffer.resize( buffer_size );
decodedBuffer.resize(buffer_size);
int buffer_frames = decodedBuffer.size() / _opus_num_channels / static_cast<int>(sizeof( opus_int16 ));
int decoded_frames = opus_decode( _decoder, nullptr, 0, reinterpret_cast<opus_int16*>(decodedBuffer.data()),
@ -138,4 +138,3 @@ void AthenaOpusDecoder::lostFrame(QByteArray &decodedBuffer)
}