Fix recovery timeout if no output frames are being received

This commit is contained in:
Cameron Gutman
2022-09-18 18:37:33 -05:00
parent 94ef66994d
commit 5bfce88fc5

View File

@@ -783,12 +783,14 @@ public class MediaCodecDecoderRenderer extends VideoDecoderRenderer implements C
e.printStackTrace();
handleDecoderException(e);
}
} finally {
doCodecRecoveryIfRequired(CR_FLAG_CHOREOGRAPHER);
}
}
}
// Attempt codec recovery even if we have nothing to render right now. Recovery can still
// be required even if the codec died before giving any output.
doCodecRecoveryIfRequired(CR_FLAG_CHOREOGRAPHER);
// Request another callback for next frame
Choreographer.getInstance().postFrameCallback(this);
}