[libcamera-devel] [PATCH v2] gstreamer: Update format specifier in Request Pad template

Vedant Paranjape vedantparanjape160201 at gmail.com
Wed Jul 28 16:37:37 CEST 2021


Change format specifier %s to %u in name template field of request pad
template.

Pad names are as follows, src_0, src_1, etc. So, instead of using string
format specifier, unsigned integer format specifier is used.

Signed-off-by: Vedant Paranjape <vedantparanjape160201 at gmail.com>
---
 src/gstreamer/gstlibcamerasrc.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gstreamer/gstlibcamerasrc.cpp b/src/gstreamer/gstlibcamerasrc.cpp
index bb8ea07a..553fad02 100644
--- a/src/gstreamer/gstlibcamerasrc.cpp
+++ b/src/gstreamer/gstlibcamerasrc.cpp
@@ -149,7 +149,7 @@ GstStaticPadTemplate src_template = {
 
 /* More pads can be requested in state < PAUSED */
 GstStaticPadTemplate request_src_template = {
-	"src_%s", GST_PAD_SRC, GST_PAD_REQUEST, TEMPLATE_CAPS
+	"src_%u", GST_PAD_SRC, GST_PAD_REQUEST, TEMPLATE_CAPS
 };
 
 void
-- 
2.25.1



More information about the libcamera-devel mailing list