gstreamer: Use copied camera name
The camera name is copied in gst_libcamera_src_open() as we can't hold
the lock protecting the name while calling GST_ELEMENT_ERROR(). The
GST_ELEMENT_ERROR() macro sends a message on the bus, taking more locks
and possibly causing issues.
However, the current code makes the copy, but does not actually use it.
So fix that.
Fixes: 58feb69f85
("gst: libcamerasrc: Implement selection and acquisition")
Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
f113464b34
commit
e43d2a35fa
1 changed files with 2 additions and 2 deletions
|
@ -377,10 +377,10 @@ gst_libcamera_src_open(GstLibcameraSrc *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (camera_name) {
|
if (camera_name) {
|
||||||
cam = cm->get(self->camera_name);
|
cam = cm->get(camera_name);
|
||||||
if (!cam) {
|
if (!cam) {
|
||||||
GST_ELEMENT_ERROR(self, RESOURCE, NOT_FOUND,
|
GST_ELEMENT_ERROR(self, RESOURCE, NOT_FOUND,
|
||||||
("Could not find a camera named '%s'.", self->camera_name),
|
("Could not find a camera named '%s'.", camera_name),
|
||||||
("libcamera::CameraMananger::get() returned nullptr"));
|
("libcamera::CameraMananger::get() returned nullptr"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue