Skip to content

Commit 96b46d0

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 ae7468a commit 96b46d0

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
@@ -432,11 +432,16 @@ static gboolean sinkEventHandler(GstBaseTransform* trans, GstEvent* event)
432432
// handled in here.
433433
switch (GST_EVENT_TYPE(event)) {
434434
case GST_EVENT_CUSTOM_DOWNSTREAM_OOB: {
435-
ASSERT(gst_event_has_name(event, "attempt-to-decrypt"));
436-
GST_DEBUG_OBJECT(self, "Handling attempt-to-decrypt");
437-
gboolean result = installCDMProxyIfNotAvailable(self);
438-
gst_event_unref(event);
439-
return result;
435+
GST_DEBUG_OBJECT(self, "Custom Downstream OOB %" GST_PTR_FORMAT, event);
436+
437+
if (gst_event_has_name(event, "attempt-to-decrypt")) {
438+
GST_DEBUG_OBJECT(self, "Handling attempt-to-decrypt");
439+
gboolean result = installCDMProxyIfNotAvailable(self);
440+
gst_event_unref(event);
441+
return result;
442+
}
443+
// Let event propagate.
444+
break;
440445
}
441446
case GST_EVENT_FLUSH_START:
442447
GST_DEBUG_OBJECT(self, "Flush-start");

0 commit comments

Comments
 (0)