Changeset 269033 in webkit
- Timestamp:
- Oct 27, 2020, 6:00:41 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r269032 r269033 1 2020-10-27 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [EME][GStreamer] Decode base64 init data if needed 4 https://bugs.webkit.org/show_bug.cgi?id=218175 5 6 Reviewed by Philippe Normand. 7 8 There are certain strings with certain key systems that deliver 9 initialization data encoded as base64 so we need to decode it 10 first. 11 12 * platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h: 13 (WebCore::InitData::InitData): 14 (WebCore::InitData::decodeBase64IfNeeded): 15 1 16 2020-10-15 Sergio Villar Senin <svillar@igalia.com> 2 17 -
trunk/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h
r269031 r269033 27 27 #include "SharedBuffer.h" 28 28 #include <gst/gst.h> 29 #include <wtf/text/Base64.h> 29 30 #include <wtf/text/WTFString.h> 30 31 … … 52 53 } 53 54 m_payload = mappedInitData->createSharedBuffer(); 55 decodeBase64IfNeeded(); 54 56 } 55 57 … … 58 60 , m_payload(WTFMove(payload)) 59 61 { 62 decodeBase64IfNeeded(); 60 63 } 61 64 … … 74 77 75 78 m_payload->append(*initData.payload()); 79 } 80 81 void decodeBase64IfNeeded() 82 { 83 GST_CAT_LEVEL_LOG(webkit_media_common_encryption_decrypt_debug_category, GST_LEVEL_TRACE, nullptr, "payload size %zu", m_payload->size()); 84 if (!m_payload->size()) 85 return; 86 87 Vector<char> out; 88 if (!base64Decode(m_payload->data(), m_payload->size(), out)) { 89 GST_CAT_LEVEL_LOG(webkit_media_common_encryption_decrypt_debug_category, GST_LEVEL_TRACE, nullptr, "payload did not decode base64, considering ok"); 90 return; 91 } 92 93 GST_CAT_LEVEL_LOG(webkit_media_common_encryption_decrypt_debug_category, GST_LEVEL_TRACE, nullptr, "payload decoded to base64, new size %zu", out.size()); 94 m_payload = SharedBuffer::create(out.data(), out.size()); 76 95 } 77 96
Note:
See TracChangeset
for help on using the changeset viewer.