Skip to content

Commit 2d9c61e

Browse files
committed
[GStreamer][EME] Allow GST_EVENT_CUSTOM_DOWNSTREAM_OOB to propagate when not handled
https://bugs.webkit.org/show_bug.cgi?id=271041 Reviewed by Philippe Normand. We may wish to use GST_EVENT_CUSTOM_DOWNSTREAM_OOB event for use cases beyond signaling an "attempt-to-decrypt". Patch by Filipe Norte <filipe.norte@sky.uk>. * Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: (sinkEventHandler): Canonical link: https://commits.webkit.org/276144@main
1 parent 855f7c0 commit 2d9c61e

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

Source/WebCore/platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,11 +435,16 @@ static gboolean sinkEventHandler(GstBaseTransform* trans, GstEvent* event)
435435
// handled in here.
436436
switch (GST_EVENT_TYPE(event)) {
437437
case GST_EVENT_CUSTOM_DOWNSTREAM_OOB: {
438-
ASSERT(gst_event_has_name(event, "attempt-to-decrypt"));
439-
GST_DEBUG_OBJECT(self, "Handling attempt-to-decrypt");
440-
gboolean result = installCDMProxyIfNotAvailable(self);
441-
gst_event_unref(event);
442-
return result;
438+
GST_DEBUG_OBJECT(self, "Custom Downstream OOB %" GST_PTR_FORMAT, event);
439+
440+
if (gst_event_has_name(event, "attempt-to-decrypt")) {
441+
GST_DEBUG_OBJECT(self, "Handling attempt-to-decrypt");
442+
gboolean result = installCDMProxyIfNotAvailable(self);
443+
gst_event_unref(event);
444+
return result;
445+
}
446+
// Let event propagate.
447+
break;
443448
}
444449
case GST_EVENT_FLUSH_START:
445450
GST_DEBUG_OBJECT(self, "Flush-start");

0 commit comments

Comments
 (0)