Index: webkitgtk-2.52.0/Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp
===================================================================
--- webkitgtk-2.52.0.orig/Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp
+++ webkitgtk-2.52.0/Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp
@@ -598,10 +598,14 @@ void VideoFrame::copyTo(std::span<uint8_
     case VideoFrameGStreamer::MemoryType::System:
         inputSample = self.sample();
         break;
+#if USE(GSTREAMER_GL)
     case VideoFrameGStreamer::MemoryType::GL:
+#if USE(GBM)
     case VideoFrameGStreamer::MemoryType::DMABuf:
+#endif
         inputSample = self.downloadSample();
         break;
+#endif
     }
 
     if (!inputSample) {
