From 1a8e7aa92dc1efcde340674c8778baa10b71b8aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 21 May 2024 08:24:51 +0300 Subject: [PATCH] bufferlist: get() is not actually nullable in its return value Passing an out of bounds index is the only way to get a NULL buffer but this causes an assertion so is not to be considered for the annotations. Part-of: --- girs/Gst-1.0.gir | 12 ++++++------ subprojects/gstreamer/gst/gstbufferlist.c | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/girs/Gst-1.0.gir b/girs/Gst-1.0.gir index fc20cab5c1..282c6919c0 100644 --- a/girs/Gst-1.0.gir +++ b/girs/Gst-1.0.gir @@ -3739,10 +3739,10 @@ the list should be skipped. You must make sure that @idx does not exceed the number of buffers available. - - the buffer at @idx in @group - or %NULL when there is no buffer. The buffer remains valid as - long as @list is valid and buffer is not removed from the list. + + the buffer at @idx in @group. + The returned buffer remains valid as long as @list is valid and + buffer is not removed from the list. @@ -3762,9 +3762,9 @@ buffers available. You must make sure that @idx does not exceed the number of buffers available. - + the buffer at @idx in @group. - The returned buffer remains valid as long as @list is valid and + The returned buffer remains valid as long as @list is valid and the buffer is not removed from the list. diff --git a/subprojects/gstreamer/gst/gstbufferlist.c b/subprojects/gstreamer/gst/gstbufferlist.c index 140c9cf2ea..946747cf80 100644 --- a/subprojects/gstreamer/gst/gstbufferlist.c +++ b/subprojects/gstreamer/gst/gstbufferlist.c @@ -332,9 +332,9 @@ gst_buffer_list_foreach (GstBufferList * list, GstBufferListFunc func, * You must make sure that @idx does not exceed the number of * buffers available. * - * Returns: (transfer none) (nullable): the buffer at @idx in @group - * or %NULL when there is no buffer. The buffer remains valid as - * long as @list is valid and buffer is not removed from the list. + * Returns: (transfer none): the buffer at @idx in @group. + * The returned buffer remains valid as long as @list is valid and + * buffer is not removed from the list. */ GstBuffer * gst_buffer_list_get (GstBufferList * list, guint idx) @@ -355,8 +355,8 @@ gst_buffer_list_get (GstBufferList * list, guint idx) * You must make sure that @idx does not exceed the number of * buffers available. * - * Returns: (transfer none) (nullable): the buffer at @idx in @group. - * The returned buffer remains valid as long as @list is valid and + * Returns: (transfer none): the buffer at @idx in @group. + * The returned buffer remains valid as long as @list is valid and * the buffer is not removed from the list. * * Since: 1.14