From 8a2b81a5767725f242a3cd443955ad14bce6c6cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Mon, 10 May 2010 18:53:29 -0400 Subject: [PATCH] basertpaudiopayload: Set duration on buffers Set the duration of the buffers from their size --- gst-libs/gst/rtp/gstbasertpaudiopayload.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-libs/gst/rtp/gstbasertpaudiopayload.c b/gst-libs/gst/rtp/gstbasertpaudiopayload.c index 5d43164..1596962 100644 --- a/gst-libs/gst/rtp/gstbasertpaudiopayload.c +++ b/gst-libs/gst/rtp/gstbasertpaudiopayload.c @@ -426,6 +426,9 @@ gst_base_rtp_audio_payload_set_meta (GstBaseRTPAudioPayload * payload, priv->offset += payload_len; + /* Set the duration from the size */ + GST_BUFFER_DURATION (buffer) = priv->bytes_to_time (payload, payload_len); + /* remember the last rtptime/timestamp pair. We will use this to realign our * RTP timestamp after a buffer discont */ priv->last_rtptime = GST_BUFFER_OFFSET (buffer); -- 2.7.4