From: <pk...@ke...> - 2009-10-16 08:51:43
|
Module: gst-plugins-base Branch: master Commit: 7bca2a001941798c1a4005ee37802708ed13c225 URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=7bca2a001941798c1a4005ee37802708ed13c225 Author: Peter Kjellerstedt <pk...@ax...> Date: Fri Oct 16 10:50:35 2009 +0200 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. --- gst-libs/gst/rtp/gstbasertppayload.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/rtp/gstbasertppayload.c b/gst-libs/gst/rtp/gstbasertppayload.c index a3b603c..eaa0f93 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 { |