From bd53d105d3144798682ed265fb665f581743eab8 Mon Sep 17 00:00:00 2001 From: David Reid Date: Sat, 10 Jul 2021 19:15:19 +1000 Subject: [PATCH] Properly propagate errors from ma_decoder_read_pcm_frames(). --- miniaudio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniaudio.h b/miniaudio.h index befa5428..ae866a02 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -50226,8 +50226,8 @@ MA_API ma_result ma_decoder_read_pcm_frames(ma_decoder* pDecoder, void* pFramesO *pFramesRead = totalFramesReadOut; } - if (totalFramesReadOut == 0) { - return MA_AT_END; + if (result == MA_SUCCESS && totalFramesReadOut == 0) { + result = MA_AT_END; } return result;