gtk4: Don't try to use GL mapped video frames as raw RGB memory

This will fail badly because the memory pointers are actually GL texture
IDs, however this case can't really happen in practice so simply assert
on this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1024>
This commit is contained in:
Sebastian Dröge 2022-12-22 20:57:22 +02:00 committed by GStreamer Marge Bot
parent 30e501e7b0
commit 52764e140e

View file

@ -156,6 +156,10 @@ impl Frame {
gst_ctx,
)
} else {
// This will fail badly if the video frame was actually mapped as GL texture
// but this case can't really happen as we only do that if we actually have a
// GDK GL context.
assert!(self.gst_context.is_none());
video_frame_to_memory_texture(self.frame, cached_textures, &mut used_textures)
}
}