mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
* gnu/packages/gstreamer.scm (gst-plugins-base): Update to 1.28.1. [source]: Apply a patch. [propagated-inputs]: Add libdrm. * gnu/packages/patches/gst-plugins-base-null-pointer.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. Change-Id: Id027d1e6ddc5ff331d4d64965266d7a99d859d3b
47 lines
2.0 KiB
Diff
47 lines
2.0 KiB
Diff
From 7d7c9ce06837f20d5585f1bc28a47701d12cf8ec Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
|
|
Date: Sun, 1 Mar 2026 10:53:21 +0200
|
|
Subject: [PATCH] glcolorconvert: Fix NULL pointer dereference on buffers
|
|
without video meta
|
|
|
|
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/4935
|
|
---
|
|
.../gst-libs/gst/gl/gstglcolorconvert.c | 14 ++++++++------
|
|
1 file changed, 8 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c
|
|
index f2dc2dc7bbb..c13b4df69de 100644
|
|
--- a/gst-libs/gst/gl/gstglcolorconvert.c
|
|
+++ b/gst-libs/gst/gl/gstglcolorconvert.c
|
|
@@ -3428,10 +3428,12 @@ _init_convert (GstGLColorConvert * convert)
|
|
}
|
|
|
|
GstVideoMeta *v_meta = gst_buffer_get_video_meta (convert->inbuf);
|
|
- if (v_meta->width != convert->priv->padded_width
|
|
- || v_meta->height != convert->priv->padded_height) {
|
|
- gdouble padded_width = v_meta->width;
|
|
- gdouble padded_height = v_meta->height;
|
|
+ if ((v_meta && (v_meta->width != convert->priv->padded_width
|
|
+ || v_meta->height != convert->priv->padded_height)) ||
|
|
+ (!v_meta && (convert->in_info.width != convert->priv->padded_width ||
|
|
+ convert->in_info.height != convert->priv->padded_height))) {
|
|
+ gdouble padded_width = v_meta ? v_meta->width : convert->in_info.width;
|
|
+ gdouble padded_height = v_meta ? v_meta->height : convert->in_info.height;
|
|
gdouble display_width = GST_VIDEO_INFO_WIDTH (&convert->in_info);
|
|
gdouble display_height = GST_VIDEO_INFO_HEIGHT (&convert->in_info);
|
|
|
|
@@ -3449,8 +3451,8 @@ _init_convert (GstGLColorConvert * convert)
|
|
crop_vertices, GL_STATIC_DRAW);
|
|
gl->BindBuffer (GL_ARRAY_BUFFER, 0);
|
|
|
|
- convert->priv->padded_width = v_meta->width;
|
|
- convert->priv->padded_height = v_meta->height;
|
|
+ convert->priv->padded_width = padded_width;
|
|
+ convert->priv->padded_height = padded_height;
|
|
}
|
|
|
|
gl->BindTexture (GL_TEXTURE_2D, 0);
|
|
--
|
|
GitLab
|
|
|