basertpaudiopayload: Set duration on buffers
authorOlivier CrĂȘte <olivier.crete@collabora.co.uk>
Mon, 10 May 2010 22:53:29 +0000 (18:53 -0400)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 13 May 2010 08:54:08 +0000 (10:54 +0200)
Set the duration of the buffers from their size

gst-libs/gst/rtp/gstbasertpaudiopayload.c

index 5d43164..1596962 100644 (file)
@@ -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);