Remove the decoder stop hack and try to workaround the issue differently

This commit is contained in:
Cameron Gutman committed 2017-06-06 22:48:28 -07:00
1 parent d1e41e41a1
commit 4b9c6b149a
2 files changed
+8 -8

No files matched your search

@@ -416,10 +416,18 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer {
// Halt the rendering thread
rendererThread.interrupt();
// Invalidate pending decode buffers
videoDecoder.flush();
// Wait for the renderer thread to shut down
try {
rendererThread.join();
} catch (InterruptedException ignored) { }
// Stop the video decoder
videoDecoder.stop();
// Halt the spinner threads
for (Thread t : spinnerThreads) {
t.interrupt();