mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
rtptwcc: don't assume all PacketInfo->data are buffers
They can also be buffer lists Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1268>
This commit is contained in:
parent
b83e85ab67
commit
c414f9560a
1 changed files with 21 additions and 4 deletions
|
@ -272,10 +272,27 @@ static guint16
|
|||
rtp_twcc_manager_set_send_twcc_seqnum (RTPTWCCManager * twcc,
|
||||
RTPPacketInfo * pinfo)
|
||||
{
|
||||
guint16 seqnum = twcc->send_seqnum++;
|
||||
pinfo->data = gst_buffer_make_writable (pinfo->data);
|
||||
_set_twcc_seqnum_data (pinfo->data, twcc->send_ext_id, seqnum);
|
||||
return seqnum;
|
||||
guint16 first_seqnum = twcc->send_seqnum;
|
||||
|
||||
if (GST_IS_BUFFER_LIST (pinfo->data)) {
|
||||
GstBufferList *list;
|
||||
guint i = 0;
|
||||
|
||||
pinfo->data = gst_buffer_list_make_writable (pinfo->data);
|
||||
|
||||
list = GST_BUFFER_LIST (pinfo->data);
|
||||
|
||||
for (i = 0; i < gst_buffer_list_length (list); i++) {
|
||||
GstBuffer *buffer = gst_buffer_list_get_writable (list, i);
|
||||
|
||||
_set_twcc_seqnum_data (buffer, twcc->send_ext_id, twcc->send_seqnum++);
|
||||
}
|
||||
} else {
|
||||
pinfo->data = gst_buffer_make_writable (pinfo->data);
|
||||
_set_twcc_seqnum_data (pinfo->data, twcc->send_ext_id, twcc->send_seqnum++);
|
||||
}
|
||||
|
||||
return first_seqnum;
|
||||
}
|
||||
|
||||
static gint32
|
||||
|
|
Loading…
Reference in a new issue