summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-12-08 19:31:59 -0800
committerJames Dong <jdong@google.com>2011-12-08 21:01:31 -0800
commitd1fa3ca0eee42ffd450d579b357f39163a716ee3 (patch)
treed8d69ce3df2f878f020f768ef96771561ea00619 /media
parentb7b9c7b47a771e550124ae269a7b1be262039b95 (diff)
downloadframeworks_av-d1fa3ca0eee42ffd450d579b357f39163a716ee3.zip
frameworks_av-d1fa3ca0eee42ffd450d579b357f39163a716ee3.tar.gz
frameworks_av-d1fa3ca0eee42ffd450d579b357f39163a716ee3.tar.bz2
Fixed the false drm recognition.
Change-Id: If0198e52ff7bbd7422f219f55a37aae97f7d74f1 related-to-bug: 5732033
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/AwesomePlayer.cpp24
-rw-r--r--media/libstagefright/MediaExtractor.cpp3
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)) {