888df26
diff -up firefox-101.0/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-101.0/dom/media/gmp/GMPSharedMemManager.h
888df26
--- firefox-101.0/dom/media/gmp/GMPSharedMemManager.h.1663844	2022-05-27 01:16:53.000000000 +0200
888df26
+++ firefox-101.0/dom/media/gmp/GMPSharedMemManager.h	2022-05-30 21:15:20.989993419 +0200
feba2cc
@@ -27,7 +27,7 @@ class GMPSharedMem {
feba2cc
   // returned to the parent pool (which is not included).  If more than
feba2cc
   // this are needed, we presume the client has either crashed or hung
feba2cc
   // (perhaps temporarily).
feba2cc
-  static const uint32_t kGMPBufLimit = 20;
feba2cc
+  static const uint32_t kGMPBufLimit = 40;
feba2cc
 
feba2cc
   GMPSharedMem() {
feba2cc
     for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]);
888df26
diff -up firefox-101.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 firefox-101.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
888df26
--- firefox-101.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844	2022-05-30 21:15:20.989993419 +0200
888df26
+++ firefox-101.0/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp	2022-05-30 21:24:16.615282035 +0200
888df26
@@ -66,6 +66,7 @@ media::DecodeSupportSet GMPDecoderModule
85160fd
 
888df26
   nsCString api = nsLiteralCString(CHROMIUM_CDM_API);
85160fd
 
888df26
+  // TODO: Do we enable it here?
888df26
   if (MP4Decoder::IsH264(aMimeType)) {
888df26
     isSupported = HaveGMPFor(api, {"h264"_ns, aGMP.value()});
888df26
   } else if (VPXDecoder::IsVP9(aMimeType)) {
888df26
diff -up firefox-101.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 firefox-101.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
888df26
--- firefox-101.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844	2022-05-27 01:16:53.000000000 +0200
888df26
+++ firefox-101.0/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp	2022-05-30 21:15:20.989993419 +0200
888df26
@@ -70,6 +70,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4
85160fd
   RefPtr<GMPVideoDecoder> self = this;
85160fd
   if (v) {
85160fd
     mDecodedData.AppendElement(std::move(v));
85160fd
+    mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__);
85160fd
+    mDecodedData = DecodedData();
85160fd
   } else {
85160fd
     mDecodedData.Clear();
85160fd
     mDecodePromise.RejectIfExists(