Commit 47af9a68 by olly Committed by Oliver Woodman

Enable internal retry for recoverable codec exceptions

PiperOrigin-RevId: 365556167
parent 76700e9d
......@@ -365,7 +365,6 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
private boolean enableAsynchronousBufferQueueing;
private boolean forceAsyncQueueingSynchronizationWorkaround;
private boolean enableSynchronizeCodecInteractionsWithQueueing;
private boolean enableRecoverableCodecExceptionRetries;
private boolean enableSkipAndContinueIfSampleTooLarge;
@Nullable private ExoPlaybackException pendingPlaybackException;
protected DecoderCounters decoderCounters;
......@@ -474,17 +473,6 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
}
/**
* Enables internal player retries for codec exceptions if the underlying platform indicates that
* they are recoverable.
*
* <p>This method is experimental, and will be renamed or removed in a future release. It should
* only be called before the renderer is used.
*/
public void experimentalSetRecoverableCodecExceptionRetriesEnabled(boolean enabled) {
enableRecoverableCodecExceptionRetries = enabled;
}
/**
* Enables skipping and continuing playback from the next key frame if a sample is encountered
* that's too large to fit into one of the decoder's input buffers. When not enabled, playback
* will fail in this case.
......@@ -864,10 +852,7 @@ public abstract class MediaCodecRenderer extends BaseRenderer {
} catch (IllegalStateException e) {
if (isMediaCodecException(e)) {
onCodecError(e);
boolean isRecoverable =
enableRecoverableCodecExceptionRetries
&& Util.SDK_INT >= 21
&& isRecoverableMediaCodecExceptionV21(e);
boolean isRecoverable = Util.SDK_INT >= 21 && isRecoverableMediaCodecExceptionV21(e);
if (isRecoverable) {
releaseCodec();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment