Improve the AudioDecoder API to avoid having to call a function to get the bytes consumed

This commit is contained in:
Henrik Rydgård committed 2024-04-11 16:49:00 +02:00
1 parent 45936e8826
commit 5ed77b58ca
8 files changed
+34 -43

No files matched your search

+2 -1
View File
@@ -1077,7 +1077,8 @@ int MediaEngine::getAudioSamples(u32 bufferPtr) {
m_audioContext->SetChannels(1);
}
if (!m_audioContext->Decode(audioFrame, frameSize, buffer, &outbytes)) {
int inbytesConsumed = 0;
if (!m_audioContext->Decode(audioFrame, frameSize, &inbytesConsumed, buffer, &outbytes)) {
ERROR_LOG(ME, "Audio (%s) decode failed during video playback", GetCodecName(m_audioType));
}