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 @Override
public void directSubmitDecodeUnit(DecodeUnit du) { public void directSubmitDecodeUnit(DecodeUnit du) {
int inputIndex; int inputIndex = -1;
notifyDuReceived(du); notifyDuReceived(du);
for (;;) { while (!Thread.currentThread().isInterrupted()) {
try { try {
inputIndex = dequeueInputBuffer(true, true); inputIndex = dequeueInputBuffer(true, true);
break; break;