[PATCH v2 6/7] gstreamer: Drop incorrect unref on caps
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Jun 4 15:07:40 CEST 2025
The caps object passeed to the gst_libcamera_create_video_pool()
function is managed as a g_autoptr() in the caller. The function doesn't
acquire any new reference, so it shouldn't call gst_caps_unref(). Fix
it.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
I believe this is right (or I wouldn't send it), but a confirmation that
nothing in gst_libcamera_create_video_pool() acquires a reference to the
caps would be appreciated.
---
src/gstreamer/gstlibcamerasrc.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index 0be64dd836ca..eec8163e88e7 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -580,7 +580,6 @@ gst_libcamera_create_video_pool(GstLibcameraSrc *self, GstPad *srcpad,
}
if (!gst_buffer_pool_set_active(pool, true)) {
- gst_caps_unref(caps);
GST_ELEMENT_ERROR(self, RESOURCE, SETTINGS,
("Failed to active buffer pool"),
("gst_libcamera_src_negotiate() failed."));
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list