Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorStian Selnes <stian@pexip.com>2015-10-23 12:08:56 +0300
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-09-28 18:27:17 +0300
commitd494be99167d81250bb9715015b067123d117a03 (patch)
treedb23535cd40c6c14250a0a7e9b01ca6b517a10ef /gst
parent7736a216596df2feb5465fdee4c3f14284b1e901 (diff)
rtpvp8pay: Fix allocation to support source-info property
Use gst_rtp_base_payload_allocate_output_buffer() in order to allocate RTP buffer with correct number of CSRCs according to the meta. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/314 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/612>
Diffstat (limited to 'gst')
-rw-r--r--gst/rtp/gstrtpvp8pay.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/rtp/gstrtpvp8pay.c b/gst/rtp/gstrtpvp8pay.c
index 4d6d20f7f..e3c8b3483 100644
--- a/gst/rtp/gstrtpvp8pay.c
+++ b/gst/rtp/gstrtpvp8pay.c
@@ -385,7 +385,9 @@ gst_rtp_vp8_create_header_buffer (GstRtpVP8Pay * self, guint8 partid,
guint8 *p;
GstRTPBuffer rtpbuffer = GST_RTP_BUFFER_INIT;
- out = gst_rtp_buffer_new_allocate (gst_rtp_vp8_calc_header_len (self), 0, 0);
+ out = gst_rtp_base_payload_allocate_output_buffer (
+ GST_RTP_BASE_PAYLOAD_CAST (self), gst_rtp_vp8_calc_header_len (self),
+ 0, 0);
gst_rtp_buffer_map (out, GST_MAP_READWRITE, &rtpbuffer);
p = gst_rtp_buffer_get_payload (&rtpbuffer);
/* X=0,R=0,N=0,S=start,PartID=partid */
@@ -470,7 +472,8 @@ gst_rtp_vp8_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
mtu = GST_RTP_BASE_PAYLOAD_MTU (payload);
vp8_hdr_len = gst_rtp_vp8_calc_header_len (self);
- max_paylen = gst_rtp_buffer_calc_payload_len (mtu - vp8_hdr_len, 0, 0);
+ max_paylen = gst_rtp_buffer_calc_payload_len (mtu - vp8_hdr_len, 0,
+ gst_rtp_base_payload_get_source_count (payload, buffer));
list = gst_buffer_list_new_sized ((size / max_paylen) + 1);