summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-05-11 01:30:23 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-07-04 23:07:37 +0300
commit44d14d82457ce07fade85bd5bb04c8de8f277140 (patch)
treedcd4acc5cee0b7b9608537d88b4ee226e9b871b0
parent053ffcca0617aea9facd664adae133fb073e52a7 (diff)
gstreamer: Move variable to loop scope
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@ideasonboard.com> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
-rw-r--r--src/gstreamer/gstlibcamerasrc.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index 9d6be075..dea14396 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);