AudioTrack will mark 0-size buffers as consumed

This can happen in the first, non-codec-config output buffer
from MediaCodec, while decoding MP3 data.

This issue was discovered on Nexus 5's running both KitKat
Lollippop.
This commit is contained in:
Alex Puterbaugh 2014-12-17 11:30:49 -08:00
parent 48540c2ba0
commit 52e5b8e848

View File

@ -399,6 +399,7 @@ public final class AudioTrack {
}
if (size == 0) {
result |= RESULT_BUFFER_CONSUMED;
return result;
}