Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/video
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2022-12-22 21:57:22 +0300
committerSebastian Dröge <sebastian@centricular.com>2022-12-27 13:39:56 +0300
commit8d7ce380c4445518f7f7423038621986d469d516 (patch)
tree63dcaf6b3de848e3f85fb14a93b81ddd47d8a021 /video
parente8701652e222bc53afb892b0fdb634a9f3b96d8d (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.rs4
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)
}
}