diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2022-12-22 21:57:22 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2022-12-27 13:39:56 +0300 |
commit | 8d7ce380c4445518f7f7423038621986d469d516 (patch) | |
tree | 63dcaf6b3de848e3f85fb14a93b81ddd47d8a021 /video | |
parent | e8701652e222bc53afb892b0fdb634a9f3b96d8d (diff) |
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/1027>
Diffstat (limited to 'video')
-rw-r--r-- | video/gtk4/src/sink/frame.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/gtk4/src/sink/frame.rs b/video/gtk4/src/sink/frame.rs index 430150aeb..d6eefbe14 100644 --- a/video/gtk4/src/sink/frame.rs +++ b/video/gtk4/src/sink/frame.rs @@ -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) } } |