rtpbuffer: The out args for rtp extension data are optional

The code checks that these are != NULL before dereferencing them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1980>
This commit is contained in:
Nirbheek Chauhan 2022-03-15 12:57:49 +05:30 committed by GStreamer Marge Bot
parent 96e9e74c88
commit cb182062ad

View file

@ -684,9 +684,9 @@ gst_rtp_buffer_set_extension (GstRTPBuffer * rtp, gboolean extension)
/**
* gst_rtp_buffer_get_extension_data: (skip)
* @rtp: the RTP packet
* @bits: (out): location for result bits
* @data: (out) (array) (element-type guint8) (transfer none): location for data
* @wordlen: (out): location for length of @data in 32 bits words
* @bits: (optional) (out): location for result bits
* @data: (optional) (out) (array) (element-type guint8) (transfer none): location for data
* @wordlen: (optional) (out): location for length of @data in 32 bits words
*
* Get the extension data. @bits will contain the extension 16 bits of custom
* data. @data will point to the data in the extension and @wordlen will contain
@ -1457,9 +1457,9 @@ gst_rtp_buffer_get_extension_onebyte_header_from_bytes (GBytes * bytes,
* @rtp: the RTP packet
* @id: The ID of the header extension to be read (between 1 and 14).
* @nth: Read the nth extension packet with the requested ID
* @data: (out) (array length=size) (element-type guint8) (transfer none):
* @data: (optional) (out) (array length=size) (element-type guint8) (transfer none):
* location for data
* @size: (out): the size of the data in bytes
* @size: (optional) (out): the size of the data in bytes
*
* Parses RFC 5285 style header extensions with a one byte header. It will
* return the nth extension with the requested id.
@ -1487,12 +1487,12 @@ gst_rtp_buffer_get_extension_onebyte_header (GstRTPBuffer * rtp, guint8 id,
/**
* gst_rtp_buffer_get_extension_twobytes_header:
* @rtp: the RTP packet
* @appbits: (out): Application specific bits
* @appbits: (optional) (out): Application specific bits
* @id: The ID of the header extension to be read (between 1 and 14).
* @nth: Read the nth extension packet with the requested ID
* @data: (out) (array length=size) (element-type guint8) (transfer none):
* @data: (optional) (out) (array length=size) (element-type guint8) (transfer none):
* location for data
* @size: (out): the size of the data in bytes
* @size: (optional) (out): the size of the data in bytes
*
* Parses RFC 5285 style header extensions with a two bytes header. It will
* return the nth extension with the requested id.