summaryrefslogtreecommitdiff
path: root/mozilla-1663844.patch
blob: 4cc43ea5df8cc2391a10073aa34423d62ca2af29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff -up firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844 firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h
--- firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h.1663844	2022-06-08 23:06:36.000000000 +0200
+++ firefox-101.0.1/dom/media/gmp/GMPSharedMemManager.h	2022-06-09 17:17:04.775008085 +0200
@@ -27,7 +27,7 @@ class GMPSharedMem {
   // returned to the parent pool (which is not included).  If more than
   // this are needed, we presume the client has either crashed or hung
   // (perhaps temporarily).
-  static const uint32_t kGMPBufLimit = 20;
+  static const uint32_t kGMPBufLimit = 40;
 
   GMPSharedMem() {
     for (size_t i = 0; i < sizeof(mGmpAllocated) / sizeof(mGmpAllocated[0]);
diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844 firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp
--- firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp.1663844	2022-06-08 16:10:21.000000000 +0200
+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPDecoderModule.cpp	2022-06-09 20:31:25.120035588 +0200
@@ -84,6 +84,9 @@ media::DecodeSupportSet GMPDecoderModule
 
 media::DecodeSupportSet GMPDecoderModule::SupportsMimeType(
     const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics) const {
+  if (MP4Decoder::IsH264(aMimeType)) {
+    return media::DecodeSupport::SoftwareDecode;
+  }
   return media::DecodeSupport::Unsupported;
 }
 
diff -up firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844 firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp
--- firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp.1663844	2022-06-08 16:10:21.000000000 +0200
+++ firefox-101.0.1/dom/media/platforms/agnostic/gmp/GMPVideoDecoder.cpp	2022-06-09 17:17:04.776008117 +0200
@@ -70,6 +70,8 @@ void GMPVideoDecoder::Decoded(GMPVideoi4
   RefPtr<GMPVideoDecoder> self = this;
   if (v) {
     mDecodedData.AppendElement(std::move(v));
+    mDecodePromise.ResolveIfExists(std::move(mDecodedData), __func__);
+    mDecodedData = DecodedData();
   } else {
     mDecodedData.Clear();
     mDecodePromise.RejectIfExists(
bgstack15