diff options
author | James Dong <jdong@google.com> | 2011-12-08 19:31:59 -0800 |
---|---|---|
committer | James Dong <jdong@google.com> | 2011-12-08 21:01:31 -0800 |
commit | aadbd80b307c817698ce5110ff8e002804d1b230 (patch) | |
tree | be5cab6d739c403a2a1a5a0b5a38c5bf2f330fd3 /media | |
parent | be5f49fb6e17e0b9588d3b94022b7e3eb6d47317 (diff) | |
download | frameworks_base-aadbd80b307c817698ce5110ff8e002804d1b230.zip frameworks_base-aadbd80b307c817698ce5110ff8e002804d1b230.tar.gz frameworks_base-aadbd80b307c817698ce5110ff8e002804d1b230.tar.bz2 |
Fixed the false drm recognition.
Change-Id: If0198e52ff7bbd7422f219f55a37aae97f7d74f1
related-to-bug: 5732033
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/AwesomePlayer.cpp | 24 | ||||
-rw-r--r-- | media/libstagefright/MediaExtractor.cpp | 3 |
2 files changed, 17 insertions, 10 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index ba9c4c4..e58d700 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -335,11 +335,13 @@ status_t AwesomePlayer::setDataSource_l( return UNKNOWN_ERROR; } - dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient); - if (mDecryptHandle != NULL) { - CHECK(mDrmManagerClient); - if (RightsStatus::RIGHTS_VALID != mDecryptHandle->status) { - notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE); + if (extractor->getDrmFlag()) { + dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient); + if (mDecryptHandle != NULL) { + CHECK(mDrmManagerClient); + 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) { - CHECK(mDrmManagerClient); - if (RightsStatus::RIGHTS_VALID != mDecryptHandle->status) { - notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE); + if (mDecryptHandle != NULL) { + CHECK(mDrmManagerClient); + if (RightsStatus::RIGHTS_VALID != mDecryptHandle->status) { + notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE); + } } } diff --git a/media/libstagefright/MediaExtractor.cpp b/media/libstagefright/MediaExtractor.cpp index 374ecf7..9eee6aa 100644 --- a/media/libstagefright/MediaExtractor.cpp +++ b/media/libstagefright/MediaExtractor.cpp @@ -111,6 +111,9 @@ sp<MediaExtractor> MediaExtractor::Create( ret = new MPEG2TSExtractor(source); } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_WVM)) { ret = new WVMExtractor(source); + if (ret != NULL) { + isDrm = true; + } } else if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_AAC_ADTS)) { ret = new AACExtractor(source); } else if (!strcasecmp(mime, MEDIA_MIMETYPE_CONTAINER_MPEG2PS)) { |