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

Commit 89cefe5c authored by Wei Jia's avatar Wei Jia
Browse files

NdkWrapper: return NULL when cryptoInfo is NULL

Test: cts
Bug: 122073361
Change-Id: I3192f1935760e4e1d1038d7b4cb328975a9a63e5
parent a09fa50c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1249,7 +1249,11 @@ sp<AMediaCodecCryptoInfoWrapper> AMediaExtractorWrapper::getSampleCryptoInfo() {
    if (mAMediaExtractor == NULL) {
        return NULL;
    }
    return new AMediaCodecCryptoInfoWrapper(AMediaExtractor_getSampleCryptoInfo(mAMediaExtractor));
    AMediaCodecCryptoInfo *cryptoInfo = AMediaExtractor_getSampleCryptoInfo(mAMediaExtractor);
    if (cryptoInfo == NULL) {
        return NULL;
    }
    return new AMediaCodecCryptoInfoWrapper(cryptoInfo);
}

AMediaDataSourceWrapper::AMediaDataSourceWrapper(const sp<DataSource> &dataSource)