message: Remove nullable annotation from gst_message_writable_details()

This function can never return NULL as the details are created for the message
if there are none yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8235>
This commit is contained in:
Sebastian Dröge 2025-01-03 14:16:25 +02:00 committed by GStreamer Marge Bot
parent 0aeba9275c
commit 2f3deb4009
3 changed files with 4 additions and 6 deletions

View file

@ -26819,8 +26819,8 @@ want to write to the @details structure.
The returned structure must not be freed.</doc> The returned structure must not be freed.</doc>
<source-position filename="../subprojects/gstreamer/gst/gstmessage.h"/> <source-position filename="../subprojects/gstreamer/gst/gstmessage.h"/>
<return-value transfer-ownership="none" nullable="1"> <return-value transfer-ownership="none">
<doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstmessage.c">The details, or NULL if none.</doc> <doc xml:space="preserve" filename="../subprojects/gstreamer/gst/gstmessage.c">The details</doc>
<type name="Structure" c:type="GstStructure*"/> <type name="Structure" c:type="GstStructure*"/>
</return-value> </return-value>
<parameters> <parameters>

View file

@ -2181,10 +2181,8 @@ update_message_with_uri (GstURIDecodeBin3 * uridecodebin, GstMessage * msg)
GstStructure *details; GstStructure *details;
msg = gst_message_make_writable (msg); msg = gst_message_make_writable (msg);
details = gst_message_writable_details (msg); details = gst_message_writable_details (msg);
if (details) {
gst_structure_set (details, "uri", G_TYPE_STRING, uri, NULL); gst_structure_set (details, "uri", G_TYPE_STRING, uri, NULL);
} }
}
if (unlock_after) if (unlock_after)
PLAY_ITEMS_UNLOCK (uridecodebin); PLAY_ITEMS_UNLOCK (uridecodebin);

View file

@ -505,7 +505,7 @@ gst_message_get_details (GstMessage * message)
* *
* The returned structure must not be freed. * The returned structure must not be freed.
* *
* Returns: (transfer none) (nullable): The details, or NULL if none. * Returns: (transfer none): The details
* *
* Since: 1.26 * Since: 1.26
*/ */