tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 9f8e6b14f0684d0034e0567e0fb57b7d792b3d4e
parent bcf14f680dce1867432d22a716e7cc251ad8bd19
Author: Andrew Osmond <aosmond@gmail.com>
Date:   Tue,  4 Nov 2025 22:13:30 +0000

Bug 1998259 - Switch to calling AMediaCodecCryptoInfo_setPattern directly. r=media-playback-reviewers,azebrowski

This fixes a minor regression breaking the cbcs crypto scheme with the
ffmpeg pathway for Android video decoding. It is still pref'd off by
default.

Differential Revision: https://phabricator.services.mozilla.com/D271291

Diffstat:
Mdom/media/eme/mediadrm/MediaDrmRemoteCDMParent.cpp | 14+-------------
Mdom/media/eme/mediadrm/MediaDrmRemoteCDMParent.h | 5-----
2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/dom/media/eme/mediadrm/MediaDrmRemoteCDMParent.cpp b/dom/media/eme/mediadrm/MediaDrmRemoteCDMParent.cpp @@ -19,9 +19,6 @@ namespace mozilla { StaticAutoPtr<MediaDrmRemoteCDMParent::DrmCallbackMap> MediaDrmRemoteCDMParent::sCbMap; -AMediaCodecCryptoInfoFnPtr_setPattern - MediaDrmRemoteCDMParent::sAMediaCodecCryptoInfo_setPattern; - /* static */ void MediaDrmRemoteCDMParent::InitializeStatics() { if (sCbMap) { @@ -29,8 +26,6 @@ void MediaDrmRemoteCDMParent::InitializeStatics() { } sCbMap = new DrmCallbackMap(); - - MOZ_ASSERT(sAMediaCodecCryptoInfo_setPattern); } /* static */ @@ -848,12 +843,6 @@ already_AddRefed<MediaDrmCryptoInfo> MediaDrmRemoteCDMParent::CreateCryptoInfo( break; case CryptoScheme::Cbcs: case CryptoScheme::Cbcs_1_9: - if (NS_WARN_IF( - !MediaDrmRemoteCDMParent::sAMediaCodecCryptoInfo_setPattern)) { - MOZ_ASSERT_UNREACHABLE( - "AMediaCodecCryptoInfo_setPattern not available, but using CBCS"); - return nullptr; - } mode = AMEDIACODECRYPTOINFO_MODE_AES_CBC; break; default: @@ -873,8 +862,7 @@ already_AddRefed<MediaDrmCryptoInfo> MediaDrmRemoteCDMParent::CreateCryptoInfo( cryptoinfo_pattern_t pattern = {}; pattern.encryptBlocks = cryptoObj.mCryptByteBlock; pattern.skipBlocks = cryptoObj.mSkipByteBlock; - MediaDrmRemoteCDMParent::sAMediaCodecCryptoInfo_setPattern(cryptoInfo, - &pattern); + AMediaCodecCryptoInfo_setPattern(cryptoInfo, &pattern); } return MakeAndAddRef<MediaDrmCryptoInfo>(cryptoInfo); diff --git a/dom/media/eme/mediadrm/MediaDrmRemoteCDMParent.h b/dom/media/eme/mediadrm/MediaDrmRemoteCDMParent.h @@ -19,9 +19,6 @@ namespace mozilla { -using AMediaCodecCryptoInfoFnPtr_setPattern = void (*)(AMediaCodecCryptoInfo*, - cryptoinfo_pattern_t*); - class MediaDrmCrypto final { template <typename T, typename... Args> friend RefPtr<T> MakeRefPtr(Args&&...); @@ -149,8 +146,6 @@ class MediaDrmRemoteCDMParent final : public RemoteCDMParent { using DrmCallbackMap = std::map<AMediaDrm*, MediaDrmRemoteCDMParent*>; static StaticAutoPtr<DrmCallbackMap> sCbMap; - static AMediaCodecCryptoInfoFnPtr_setPattern - sAMediaCodecCryptoInfo_setPattern; struct SessionEntry { AMediaDrmSessionId id;