gstreamer: Fix unused variable error

Commit fd84180d7a ("gstreamer: Implement element EOS handling") has
introduced a compilation warning with clang:

../../src/gstreamer/gstlibcamerasrc.cpp:768:23: error: unused variable 'oldEvent' [-Werror,-Wunused-variable]
                g_autoptr(GstEvent) oldEvent = self->pending_eos.exchange(event);
                                    ^

This seems to be a false positive, but nonetheless breaks the build. Fix
it.

Fixes: fd84180d7a ("gstreamer: Implement element EOS handling")
Signed-off-by: Jaslo Ziska <jaslo@ziska.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
Jaslo Ziska 2023-11-22 20:15:47 +01:00 committed by Laurent Pinchart
parent 2fae9603e6
commit 62e5289819

View file

@ -765,8 +765,8 @@ gst_libcamera_src_send_event(GstElement *element, GstEvent *event)
switch (GST_EVENT_TYPE(event)) {
case GST_EVENT_EOS: {
g_autoptr(GstEvent) oldEvent = self->pending_eos.exchange(event);
GstEvent *oldEvent = self->pending_eos.exchange(event);
gst_clear_event(&oldEvent);
ret = TRUE;
break;
}