Removing source stop at flush for Modular DRM
Bug: 35445244
Test: Manual through the test app
Change-Id: Id25f033b0a4c99ea4838d397a67c610458226394
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index e800d13..50d5343 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -199,7 +199,8 @@
mSourceStarted(false),
mPaused(false),
mPausedByClient(true),
- mPausedForBuffering(false) {
+ mPausedForBuffering(false),
+ mIsDrmProtected(false) {
clearFlushComplete();
}
@@ -1145,12 +1146,6 @@
case SHUTTING_DOWN_DECODER:
break; // Wait for shutdown to complete.
case FLUSHED:
- // Both secure audio/video now. Legacy Widevine did it for secure video.
- // Widevine source reads must stop before releasing the video decoder.
- if (mSource != NULL && mIsDrmProtected) {
- mSource->stop();
- mSourceStarted = false;
- }
getDecoder(audio)->initiateShutdown(); // In the middle of a seek.
*flushing = SHUTTING_DOWN_DECODER; // Shut down.
break;
@@ -1574,12 +1569,6 @@
*state = SHUTTING_DOWN_DECODER;
ALOGV("initiating %s decoder shutdown", audio ? "audio" : "video");
- // Both secure audio/video now. Legacy Widevine did it for secure video only.
- // Widevine source reads must stop before releasing the video decoder.
- if (mSource != NULL && mIsDrmProtected) {
- mSource->stop();
- mSourceStarted = false;
- }
getDecoder(audio)->initiateShutdown();
break;
}
@@ -2724,7 +2713,11 @@
// TODO change to ALOGV
ALOGD("onReleaseDrm ");
- mIsDrmProtected = true;
+ if (!mIsDrmProtected) {
+ ALOGW("onReleaseDrm: Unexpected. mIsDrmProtected is already false.");
+ }
+
+ mIsDrmProtected = false;
status_t status;
if (mCrypto != NULL) {