[libcamera-devel] [PATCH 03/13] gstreamer: Move variable to loop scope
Umang Jain
umang.jain at ideasonboard.com
Wed Jun 29 13:23:23 CEST 2022
Hi Laurent,
Thank you for the patch.
On 6/24/22 04:52, Laurent Pinchart via libcamera-devel wrote:
> The GstBuffer variable in GstLibcameraSrcState::requestCompleted() is
> only used within the loop scope. Make it a local loop variable.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
> ---
> src/gstreamer/gstlibcamerasrc.cpp | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
> index 9d6be075a474..dea143961d69 100644
> --- a/src/gstreamer/gstlibcamerasrc.cpp
> +++ b/src/gstreamer/gstlibcamerasrc.cpp
> @@ -165,10 +165,9 @@ GstLibcameraSrcState::requestCompleted(Request *request)
> return;
> }
>
> - GstBuffer *buffer;
> for (GstPad *srcpad : srcpads_) {
> Stream *stream = gst_libcamera_pad_get_stream(srcpad);
> - buffer = wrap->detachBuffer(stream);
> + GstBuffer *buffer = wrap->detachBuffer(stream);
>
> FrameBuffer *fb = gst_libcamera_buffer_get_frame_buffer(buffer);
>
More information about the libcamera-devel
mailing list