Fixed the false drm recognition.
Change-Id: If0198e52ff7bbd7422f219f55a37aae97f7d74f1 related-to-bug: 5732033
This commit is contained in:
@@ -335,11 +335,13 @@ status_t AwesomePlayer::setDataSource_l(
|
|||||||
return UNKNOWN_ERROR;
|
return UNKNOWN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient);
|
if (extractor->getDrmFlag()) {
|
||||||
if (mDecryptHandle != NULL) {
|
dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient);
|
||||||
CHECK(mDrmManagerClient);
|
if (mDecryptHandle != NULL) {
|
||||||
if (RightsStatus::RIGHTS_VALID != mDecryptHandle->status) {
|
CHECK(mDrmManagerClient);
|
||||||
notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE);
|
if (RightsStatus::RIGHTS_VALID != mDecryptHandle->status) {
|
||||||
|
notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2113,12 +2115,14 @@ status_t AwesomePlayer::finishSetDataSource_l() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient);
|
if (extractor->getDrmFlag()) {
|
||||||
|
dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient);
|
||||||
|
|
||||||
if (mDecryptHandle != NULL) {
|
if (mDecryptHandle != NULL) {
|
||||||
CHECK(mDrmManagerClient);
|
CHECK(mDrmManagerClient);
|
||||||
if (RightsStatus::RIGHTS_VALID != mDecryptHandle->status) {
|
if (RightsStatus::RIGHTS_VALID != mDecryptHandle->status) {
|
||||||
notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE);
|
notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,6 +111,9 @@ sp<MediaExtractor> MediaExtractor::Create(
|
|||||||
ret = new MPEG2TSExtractor(source);
|
ret = new MPEG2TSExtractor(source);
|
||||||
} else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_WVM)) {
|
} else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_WVM)) {
|
||||||
ret = new WVMExtractor(source);
|
ret = new WVMExtractor(source);
|
||||||
|
if (ret != NULL) {
|
||||||
|
isDrm = true;
|
||||||
|
}
|
||||||
} else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC_ADTS)) {
|
} else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC_ADTS)) {
|
||||||
ret = new AACExtractor(source);
|
ret = new AACExtractor(source);
|
||||||
} else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MPEG2PS)) {
|
} else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MPEG2PS)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user