Don't throw exceptions during codec recovery

This commit is contained in:
Cameron Gutman
2022-09-15 02:16:24 -05:00
parent d1b24ea6af
commit 9cf27d8fb1

View File

@@ -601,8 +601,8 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
}
}
// Only throw if we're not stopping
if (!stopping) {
// Only throw if we're not stopping and aren't in the middle of codec recovery
if (!stopping && !needsReset && !needsRestart) {
//
// There seems to be a race condition with decoder/surface teardown causing some
// decoders to to throw IllegalStateExceptions even before 'stopping' is set.