Avoid looping when the thread is trying to be interrupted

This commit is contained in:
Cameron Gutman 2016-11-22 23:20:00 -08:00
parent 3143797b55
commit f5444551b2

View File

@ -810,11 +810,11 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
@Override
public void directSubmitDecodeUnit(DecodeUnit du) {
int inputIndex;
int inputIndex = -1;
notifyDuReceived(du);
for (;;) {
while (!Thread.currentThread().isInterrupted()) {
try {
inputIndex = dequeueInputBuffer(true, true);
break;