⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 276500 in webkit


Ignore:
Timestamp:
Apr 23, 2021, 9:31:30 AM (5 years ago)
Author:
calvaris@igalia.com
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r276499 r276500  
     12021-04-23  Xabier Rodriguez Calvar  <calvaris@igalia.com>
     2
     3        [GStreamer][EME] cbcs fixes
     4        https://bugs.webkit.org/show_bug.cgi?id=224976
     5
     6        Reviewed by Philippe Normand.
     7
     8        In cbcs you can get from qtdemux buffers without an iv_size
     9        because it had constant_iv_size. We need to check that.
     10
     11        When decryption bails out because of the buffer being unencrypted,
     12        we should TRACE so.
     13
     14        cbcs buffers could not include the subsample_count, we consider 0
     15        as default.
     16
     17        * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
     18        (transformInPlace):
     19
    1202021-04-23  Michael Catanzaro  <mcatanzaro@gnome.org>
    221
  • trunk/Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp

    r275599 r276500  
    226226        return GST_FLOW_NOT_SUPPORTED;
    227227    }
     228    if (!ivSize && !gst_structure_get_uint(protectionMeta->info, "constant_iv_size", &ivSize)) {
     229        GST_ERROR_OBJECT(self, "No iv_size and failed to get constant_iv_size");
     230        return GST_FLOW_NOT_SUPPORTED;
     231    }
    228232
    229233    gboolean encrypted;
     
    233237    }
    234238
    235     if (!ivSize || !encrypted)
     239    if (!ivSize || !encrypted) {
     240        GST_TRACE_OBJECT(self, "iv size %u, encrypted %s, bailing out OK as unencrypted", ivSize, boolForPrinting(encrypted));
    236241        return GST_FLOW_OK;
     242    }
    237243
    238244    GST_DEBUG_OBJECT(base, "protection meta: %" GST_PTR_FORMAT, protectionMeta->info);
    239245
    240     unsigned subSampleCount;
    241     if (!gst_structure_get_uint(protectionMeta->info, "subsample_count", &subSampleCount)) {
     246    unsigned subSampleCount = 0;
     247    // cbcs could not include the subsample_count.
     248    if (!gst_structure_get_uint(protectionMeta->info, "subsample_count", &subSampleCount)
     249        && !gst_structure_has_name(protectionMeta->info, "application/x-cbcs")) {
    242250        GST_ERROR_OBJECT(self, "Failed to get subsample_count");
    243251        return GST_FLOW_NOT_SUPPORTED;
Note: See TracChangeset for help on using the changeset viewer.