mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 06:26:23 +00:00
rtp: Correct timestamping of buffers when buffer_lists are used
The timestamping of buffers when buffer_lists are used failed if a buffer did not have both a timestamp and an offset.
This commit is contained in:
parent
f1c32d0fbb
commit
7bca2a0019
1 changed files with 4 additions and 3 deletions
|
@ -651,8 +651,8 @@ find_timestamp (GstBuffer ** buffer, guint group, guint idx, HeaderData * data)
|
|||
data->timestamp = GST_BUFFER_TIMESTAMP (*buffer);
|
||||
data->offset = GST_BUFFER_OFFSET (*buffer);
|
||||
|
||||
/* stop when we find a timestamp and duration */
|
||||
if (data->timestamp != -1 && data->offset != -1)
|
||||
/* stop when we find a timestamp */
|
||||
if (data->timestamp != -1)
|
||||
return GST_BUFFER_LIST_END;
|
||||
else
|
||||
return GST_BUFFER_LIST_CONTINUE;
|
||||
|
@ -696,10 +696,11 @@ gst_basertppayload_prepare_push (GstBaseRTPPayload * payload,
|
|||
data.ssrc = payload->current_ssrc;
|
||||
data.pt = payload->pt;
|
||||
data.caps = GST_PAD_CAPS (payload->srcpad);
|
||||
data.timestamp = -1;
|
||||
|
||||
/* find the first buffer with a timestamp */
|
||||
if (is_list) {
|
||||
data.timestamp = -1;
|
||||
data.offset = GST_BUFFER_OFFSET_NONE;
|
||||
gst_buffer_list_foreach (GST_BUFFER_LIST_CAST (obj),
|
||||
(GstBufferListFunc) find_timestamp, &data);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue