Trigger the decoder crash dialog if all recovery attempts fail

This commit is contained in:
Cameron Gutman
2022-09-18 18:29:45 -05:00
parent 257c29daca
commit 94ef66994d

View File

@@ -606,6 +606,13 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
// Our Surface is probably invalid, so just stop
stopping = true;
codecRecoveryType.set(CR_RECOVERY_TYPE_NONE);
} catch (IllegalStateException e) {
// If we failed to recover after all of these attempts, just crash
if (!reportedCrash) {
reportedCrash = true;
crashListener.notifyCrash(e);
}
throw e;
}
}