mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
rtphdrext: Make write function return a signed value
Since the return value is documented to possibly be smaller than 0, then it needs to be signed. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1258>
This commit is contained in:
parent
98f2a84a28
commit
fd93c1ac19
5 changed files with 8 additions and 7 deletions
|
@ -1641,7 +1641,7 @@ write_header_extension (GstRTPHeaderExtension * ext, gpointer user_data)
|
||||||
gsize remaining =
|
gsize remaining =
|
||||||
hdr->allocated_size - hdr->written_size - hdr->hdr_unit_size;
|
hdr->allocated_size - hdr->written_size - hdr->hdr_unit_size;
|
||||||
gsize offset = hdr->written_size + hdr->hdr_unit_size;
|
gsize offset = hdr->written_size + hdr->hdr_unit_size;
|
||||||
gsize written;
|
gssize written;
|
||||||
guint ext_id;
|
guint ext_id;
|
||||||
|
|
||||||
if (hdr->abort)
|
if (hdr->abort)
|
||||||
|
|
|
@ -279,7 +279,7 @@ gst_rtp_header_extension_get_max_size (GstRTPHeaderExtension * ext,
|
||||||
*
|
*
|
||||||
* Since: 1.20
|
* Since: 1.20
|
||||||
*/
|
*/
|
||||||
gsize
|
gssize
|
||||||
gst_rtp_header_extension_write (GstRTPHeaderExtension * ext,
|
gst_rtp_header_extension_write (GstRTPHeaderExtension * ext,
|
||||||
const GstBuffer * input_meta, GstRTPHeaderExtensionFlags write_flags,
|
const GstBuffer * input_meta, GstRTPHeaderExtensionFlags write_flags,
|
||||||
GstBuffer * output, guint8 * data, gsize size)
|
GstBuffer * output, guint8 * data, gsize size)
|
||||||
|
|
|
@ -159,7 +159,7 @@ struct _GstRTPHeaderExtensionClass
|
||||||
gsize (*get_max_size) (GstRTPHeaderExtension * ext,
|
gsize (*get_max_size) (GstRTPHeaderExtension * ext,
|
||||||
const GstBuffer * input_meta);
|
const GstBuffer * input_meta);
|
||||||
|
|
||||||
gsize (*write) (GstRTPHeaderExtension * ext,
|
gssize (*write) (GstRTPHeaderExtension * ext,
|
||||||
const GstBuffer * input_meta,
|
const GstBuffer * input_meta,
|
||||||
GstRTPHeaderExtensionFlags write_flags,
|
GstRTPHeaderExtensionFlags write_flags,
|
||||||
GstBuffer * output,
|
GstBuffer * output,
|
||||||
|
@ -210,7 +210,7 @@ GST_RTP_API
|
||||||
void gst_rtp_header_extension_set_id (GstRTPHeaderExtension * ext,
|
void gst_rtp_header_extension_set_id (GstRTPHeaderExtension * ext,
|
||||||
guint ext_id);
|
guint ext_id);
|
||||||
GST_RTP_API
|
GST_RTP_API
|
||||||
gsize gst_rtp_header_extension_write (GstRTPHeaderExtension * ext,
|
gssize gst_rtp_header_extension_write (GstRTPHeaderExtension * ext,
|
||||||
const GstBuffer * input_meta,
|
const GstBuffer * input_meta,
|
||||||
GstRTPHeaderExtensionFlags write_flags,
|
GstRTPHeaderExtensionFlags write_flags,
|
||||||
GstBuffer * output,
|
GstBuffer * output,
|
||||||
|
|
|
@ -74,7 +74,7 @@ static GstRTPHeaderExtensionFlags
|
||||||
gst_rtp_dummy_hdr_ext_get_supported_flags (GstRTPHeaderExtension * ext);
|
gst_rtp_dummy_hdr_ext_get_supported_flags (GstRTPHeaderExtension * ext);
|
||||||
static gsize gst_rtp_dummy_hdr_ext_get_max_size (GstRTPHeaderExtension * ext,
|
static gsize gst_rtp_dummy_hdr_ext_get_max_size (GstRTPHeaderExtension * ext,
|
||||||
const GstBuffer * input_meta);
|
const GstBuffer * input_meta);
|
||||||
static gsize gst_rtp_dummy_hdr_ext_write (GstRTPHeaderExtension * ext,
|
static gssize gst_rtp_dummy_hdr_ext_write (GstRTPHeaderExtension * ext,
|
||||||
const GstBuffer * input_meta, GstRTPHeaderExtensionFlags write_flags,
|
const GstBuffer * input_meta, GstRTPHeaderExtensionFlags write_flags,
|
||||||
GstBuffer * output, guint8 * data, gsize size);
|
GstBuffer * output, guint8 * data, gsize size);
|
||||||
static gboolean gst_rtp_dummy_hdr_ext_read (GstRTPHeaderExtension * ext,
|
static gboolean gst_rtp_dummy_hdr_ext_read (GstRTPHeaderExtension * ext,
|
||||||
|
@ -168,7 +168,7 @@ gst_rtp_dummy_hdr_ext_get_max_size (GstRTPHeaderExtension * ext,
|
||||||
|
|
||||||
#define TEST_DATA_BYTE 0x9d
|
#define TEST_DATA_BYTE 0x9d
|
||||||
|
|
||||||
static gsize
|
static gssize
|
||||||
gst_rtp_dummy_hdr_ext_write (GstRTPHeaderExtension * ext,
|
gst_rtp_dummy_hdr_ext_write (GstRTPHeaderExtension * ext,
|
||||||
const GstBuffer * input_meta, GstRTPHeaderExtensionFlags write_flags,
|
const GstBuffer * input_meta, GstRTPHeaderExtensionFlags write_flags,
|
||||||
GstBuffer * output, guint8 * data, gsize size)
|
GstBuffer * output, guint8 * data, gsize size)
|
||||||
|
|
|
@ -35,7 +35,8 @@ GST_START_TEST (rtp_header_ext_write)
|
||||||
GstRTPHeaderExtension *dummy;
|
GstRTPHeaderExtension *dummy;
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
guint8 *data;
|
guint8 *data;
|
||||||
gsize size, written;
|
gsize size;
|
||||||
|
gssize written;
|
||||||
|
|
||||||
dummy = rtp_dummy_hdr_ext_new ();
|
dummy = rtp_dummy_hdr_ext_new ();
|
||||||
gst_rtp_header_extension_set_id (dummy, 1);
|
gst_rtp_header_extension_set_id (dummy, 1);
|
||||||
|
|
Loading…
Reference in a new issue