[PATCH v2 0/7] gstreamer: Miscellaneous cleanups + two fixes

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Jun 4 15:07:34 CEST 2025


Hello everybody,

Here's a set of miscellaneous cleanups for libcamerasrc that follow the
recently added GstVideoMeta support. They mostly improve readability,
but patches 5/7 and 6/7 also fix two leaks and a use-after-free
respectively.

Compared to v1, I've addressed review comments, reordered the patches,
added more leak and use-after-free fixes, added patch 7/7, and performed
other small changes as detailed in the per-patch changelogs.

The code has still been compile-tested only as I haven't managed to
exercize the video pool creation code path yet. Hou, would you be able
to test this series ?

Laurent Pinchart (7):
  gstreamer: Document improvements when updating minimum GStreamer
    version
  gstreamer: Factor out video pool creation
  gstreamer: Reduce indentation in gst_libcamera_create_video_pool()
  gstreamer: Rename variable in gst_libcamera_create_video_pool()
  gstreamer: Fix leak of GstQuery and GstBufferPool in error path
  gstreamer: Drop incorrect unref on caps
  gstreamer: Replace NULL with nullptr

 src/gstreamer/gstlibcamera-controls.cpp.in |   2 +-
 src/gstreamer/gstlibcamerapad.cpp          |   2 +-
 src/gstreamer/gstlibcamerasrc.cpp          | 146 ++++++++++++++-------
 3 files changed, 98 insertions(+), 52 deletions(-)


base-commit: 290d3f82e3e3e313932a201308813c75131d16f1
--
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list