mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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>
This commit is contained in:
parent
7736a21659
commit
d494be9916
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue