[EXT] Re: [PATCH] gstreamer: Fix critical warning "gst_value_set_int_range_step: assertion 'start < end' failed"
Qi Hou
qi.hou at nxp.com
Mon Jul 1 03:11:06 CEST 2024
Hi Umang Jain,
Thanks for your review.
Regards,
Qi Hou
-----Original Message-----
From: Umang Jain <umang.jain at ideasonboard.com>
Sent: 2024年6月29日 14:29
To: Qi Hou <qi.hou at nxp.com>; libcamera-devel at lists.libcamera.org
Cc: Jared Hu <jared.hu at nxp.com>; Julien Vuillaumier <julien.vuillaumier at nxp.com>
Subject: [EXT] Re: [PATCH] gstreamer: Fix critical warning "gst_value_set_int_range_step: assertion 'start < end' failed"
Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
Hi Hou Qi,
Thank you for the patch.
On 27/06/24 6:52 am, Hou Qi wrote:
> This changes is fixing critical error message
> "gst_value_set_int_range_step: assertion 'start < end' failed"
> observed when building GStreamer caps from a stream configuration
> whose size range holds a single size.
>
> GStreamer range step definition requires distinct min and max values
> definitions, otherwise above error message is output.
Ah, seems legit.
> Libcamera SizeRange instance may define a single size leading to
s/Libcamera/libcamera
s/may define/may return/
> identical min and max values. Add a test to avoid building GStreamer
This can be rephrased better.
Add a conditional check where the min and max of the range are distinct during iterating the supported sizes for each pixelformat.
> range step from a single-size SizeRange to avoid such error.
>
> Signed-off-by: Hou Qi <qi.hou at nxp.com>
I can take care of the commit message while applying the patch,
Reviewed-by: Umang Jain <umang.jain at ideasonboard.com>
> ---
> src/gstreamer/gstlibcamera-utils.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gstreamer/gstlibcamera-utils.cpp
> b/src/gstreamer/gstlibcamera-utils.cpp
> index ec4da435..b6672b9f 100644
> --- a/src/gstreamer/gstlibcamera-utils.cpp
> +++ b/src/gstreamer/gstlibcamera-utils.cpp
> @@ -354,7 +354,7 @@ gst_libcamera_stream_formats_to_caps(const StreamFormats &formats)
> }
>
> const SizeRange &range = formats.range(pixelformat);
> - if (range.hStep && range.vStep) {
> + if (range.hStep && range.vStep && range.min !=
> + range.max) {
> GstStructure *s = gst_structure_copy(bare_s);
> GValue val = G_VALUE_INIT;
>
More information about the libcamera-devel
mailing list