Commit 54adbc3d authored by David Reid's avatar David Reid

Fix a possible infinite loop.

parent 352a776b
...@@ -2677,6 +2677,11 @@ static ma_result ma_mixer_mix_data_source_read(ma_mixer* pMixer, ma_data_source* ...@@ -2677,6 +2677,11 @@ static ma_result ma_mixer_mix_data_source_read(ma_mixer* pMixer, ma_data_source*
if (framesReadFromCallback < framesToReadFromCallback) { if (framesReadFromCallback < framesToReadFromCallback) {
atEnd = MA_TRUE; atEnd = MA_TRUE;
} }
/* An emergency failure case. Abort if we didn't consume any input nor any output frames. */
if (framesRead == 0 && framesReadFromCallback == 0) {
break;
}
} }
totalFramesProcessed += framesRead; totalFramesProcessed += framesRead;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment