summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2009-10-16 10:50:35 +0200
committerPeter Kjellerstedt <pkj@axis.com>2009-10-16 10:51:22 +0200
commit7bca2a001941798c1a4005ee37802708ed13c225 (patch)
treeae44dc73afda3925b3f593ac1d037617af6ad9c4
parentf1c32d0fbb925a221bcb7c28cc2e8ac7afc78614 (diff)
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.
-rw-r--r--gst-libs/gst/rtp/gstbasertppayload.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst-libs/gst/rtp/gstbasertppayload.c b/gst-libs/gst/rtp/gstbasertppayload.c
index a3b603cad..eaa0f9381 100644
--- a/gst-libs/gst/rtp/gstbasertppayload.c
+++ b/gst-libs/gst/rtp/gstbasertppayload.c
@@ -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 {