Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1da7ad12 authored by James Dong's avatar James Dong Committed by Android Git Automerger
Browse files

am aadbd80b: Fixed the false drm recognition.

* commit 'aadbd80b307c817698ce5110ff8e002804d1b230':
  Fixed the false drm recognition.
parents 3b42170d d1fa3ca0
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -335,6 +335,7 @@ status_t AwesomePlayer::setDataSource_l(
        return UNKNOWN_ERROR;
    }

    if (extractor->getDrmFlag()) {
        dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient);
        if (mDecryptHandle != NULL) {
            CHECK(mDrmManagerClient);
@@ -342,6 +343,7 @@ status_t AwesomePlayer::setDataSource_l(
                notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE);
            }
        }
    }

    return setDataSource_l(extractor);
}
@@ -2113,6 +2115,7 @@ status_t AwesomePlayer::finishSetDataSource_l() {
        }
    }

    if (extractor->getDrmFlag()) {
        dataSource->getDrmInfo(mDecryptHandle, &mDrmManagerClient);

        if (mDecryptHandle != NULL) {
@@ -2121,6 +2124,7 @@ status_t AwesomePlayer::finishSetDataSource_l() {
                notifyListener_l(MEDIA_ERROR, MEDIA_ERROR_UNKNOWN, ERROR_DRM_NO_LICENSE);
            }
        }
    }

    status_t err = setDataSource_l(extractor);

+3 −0
Original line number Diff line number Diff line
@@ -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)) {