rtspconnection: Annotate RTSP message parameters correctly

These parameters are not actually `out` parameters but must
be allocated and zero-initialized by the calling function.
Marking them as `out caller-allocates` will cause memory
corruptions when calling these APIs from e.g., Python code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4051>
This commit is contained in:
Patricia Muscalu 2023-02-22 14:14:15 +01:00 committed by GStreamer Marge Bot
parent 5b84439711
commit 35f1738875
2 changed files with 6 additions and 6 deletions

View file

@ -2807,7 +2807,7 @@ no_message:
/**
* gst_rtsp_connection_receive_usec:
* @conn: a #GstRTSPConnection
* @message: (out caller-allocates): the message to read
* @message: (transfer none): the message to read
* @timeout: a timeout value or 0
*
* Attempt to read into @message from the connected @conn, blocking up to
@ -5158,7 +5158,7 @@ gst_rtsp_connection_send_messages (GstRTSPConnection * conn,
/**
* gst_rtsp_connection_receive:
* @conn: a #GstRTSPConnection
* @message: (out caller-allocates): the message to read
* @message: (transfer none): the message to read
* @timeout: a timeout value or %NULL
*
* Attempt to read into @message from the connected @conn, blocking up to

View file

@ -136,7 +136,7 @@ gst_rtsp_message_new (GstRTSPMessage ** msg)
/**
* gst_rtsp_message_init:
* @msg: (out caller-allocates): a #GstRTSPMessage
* @msg: (transfer none): a #GstRTSPMessage
*
* Initialize @msg. This function is mostly used when @msg is allocated on the
* stack. The reverse operation of this is gst_rtsp_message_unset().
@ -201,7 +201,7 @@ gst_rtsp_message_new_request (GstRTSPMessage ** msg, GstRTSPMethod method,
/**
* gst_rtsp_message_init_request:
* @msg: (out caller-allocates): a #GstRTSPMessage
* @msg: (transfer none): a #GstRTSPMessage
* @method: the request method to use
* @uri: (transfer none): the uri of the request
*
@ -295,7 +295,7 @@ gst_rtsp_message_new_response (GstRTSPMessage ** msg, GstRTSPStatusCode code,
/**
* gst_rtsp_message_init_response:
* @msg: (out caller-allocates): a #GstRTSPMessage
* @msg: (transfer none): a #GstRTSPMessage
* @code: the status code
* @reason: (transfer none) (nullable): the status reason or %NULL
* @request: (transfer none) (nullable): the request that triggered the response or %NULL
@ -421,7 +421,7 @@ gst_rtsp_message_new_data (GstRTSPMessage ** msg, guint8 channel)
/**
* gst_rtsp_message_init_data:
* @msg: (out caller-allocates): a #GstRTSPMessage
* @msg: (transfer none): a #GstRTSPMessage
* @channel: a channel
*
* Initialize a new data #GstRTSPMessage for @channel.