Title: [276500] trunk/Source/WebCore
- Revision
- 276500
- Author
- [email protected]
- Date
- 2021-04-23 09:31:30 -0700 (Fri, 23 Apr 2021)
Log Message
[GStreamer][EME] cbcs fixes
https://bugs.webkit.org/show_bug.cgi?id=224976
Reviewed by Philippe Normand.
In cbcs you can get from qtdemux buffers without an iv_size
because it had constant_iv_size. We need to check that.
When decryption bails out because of the buffer being unencrypted,
we should TRACE so.
cbcs buffers could not include the subsample_count, we consider 0
as default.
* platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
(transformInPlace):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (276499 => 276500)
--- trunk/Source/WebCore/ChangeLog 2021-04-23 15:40:24 UTC (rev 276499)
+++ trunk/Source/WebCore/ChangeLog 2021-04-23 16:31:30 UTC (rev 276500)
@@ -1,3 +1,22 @@
+2021-04-23 Xabier Rodriguez Calvar <[email protected]>
+
+ [GStreamer][EME] cbcs fixes
+ https://bugs.webkit.org/show_bug.cgi?id=224976
+
+ Reviewed by Philippe Normand.
+
+ In cbcs you can get from qtdemux buffers without an iv_size
+ because it had constant_iv_size. We need to check that.
+
+ When decryption bails out because of the buffer being unencrypted,
+ we should TRACE so.
+
+ cbcs buffers could not include the subsample_count, we consider 0
+ as default.
+
+ * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
+ (transformInPlace):
+
2021-04-23 Michael Catanzaro <[email protected]>
Improve HashTableDeletedValue of ServiceWorkerRegistrationKey
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp (276499 => 276500)
--- trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp 2021-04-23 15:40:24 UTC (rev 276499)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp 2021-04-23 16:31:30 UTC (rev 276500)
@@ -225,6 +225,10 @@
GST_ERROR_OBJECT(self, "Failed to get iv_size");
return GST_FLOW_NOT_SUPPORTED;
}
+ if (!ivSize && !gst_structure_get_uint(protectionMeta->info, "constant_iv_size", &ivSize)) {
+ GST_ERROR_OBJECT(self, "No iv_size and failed to get constant_iv_size");
+ return GST_FLOW_NOT_SUPPORTED;
+ }
gboolean encrypted;
if (!gst_structure_get_boolean(protectionMeta->info, "encrypted", &encrypted)) {
@@ -232,13 +236,17 @@
return GST_FLOW_NOT_SUPPORTED;
}
- if (!ivSize || !encrypted)
+ if (!ivSize || !encrypted) {
+ GST_TRACE_OBJECT(self, "iv size %u, encrypted %s, bailing out OK as unencrypted", ivSize, boolForPrinting(encrypted));
return GST_FLOW_OK;
+ }
GST_DEBUG_OBJECT(base, "protection meta: %" GST_PTR_FORMAT, protectionMeta->info);
- unsigned subSampleCount;
- if (!gst_structure_get_uint(protectionMeta->info, "subsample_count", &subSampleCount)) {
+ unsigned subSampleCount = 0;
+ // cbcs could not include the subsample_count.
+ if (!gst_structure_get_uint(protectionMeta->info, "subsample_count", &subSampleCount)
+ && !gst_structure_has_name(protectionMeta->info, "application/x-cbcs")) {
GST_ERROR_OBJECT(self, "Failed to get subsample_count");
return GST_FLOW_NOT_SUPPORTED;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes