summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorOlivier Crete <olivier.crete@collabora.co.uk>2007-07-11 15:51:57 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-21 17:47:58 +0100
commit3905482b3f65a9dc25a4c029c72d5398bdf8c9e3 (patch)
tree301babe90ee07223bbf50b46769c16ee752052f5 /gst
parent2c955bfad32dcd920fe732a2a1ca9731d1fc5c80 (diff)
downloadgst-plugins-bad-3905482b3f65a9dc25a4c029c72d5398bdf8c9e3.tar.gz
gst-plugins-bad-3905482b3f65a9dc25a4c029c72d5398bdf8c9e3.tar.bz2
gst-plugins-bad-3905482b3f65a9dc25a4c029c72d5398bdf8c9e3.zip
[MOVED FROM GST-P-FARSIGHT] Send on packet start time
20070711155157-3e2dc-ee0e9fc13d35296593005267a2417dd65e790d29.gz
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpdtmf/gstrtpdtmfsrc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gst/rtpdtmf/gstrtpdtmfsrc.c b/gst/rtpdtmf/gstrtpdtmfsrc.c
index c3392971..3c7543cf 100644
--- a/gst/rtpdtmf/gstrtpdtmfsrc.c
+++ b/gst/rtpdtmf/gstrtpdtmfsrc.c
@@ -622,7 +622,7 @@ gst_rtp_dtmf_src_wait_for_buffer_ts (GstRTPDTMFSrc *dtmfsrc, GstBuffer * buf)
GstClockID clock_id;
GstClockReturn clock_ret;
- clock_id = gst_clock_new_single_shot_id (clock, dtmfsrc->timestamp);
+ clock_id = gst_clock_new_single_shot_id (clock, GST_BUFFER_TIMESTAMP (buf));
clock_ret = gst_clock_id_wait (clock_id, NULL);
if (clock_ret != GST_CLOCK_OK && clock_ret != GST_CLOCK_EARLY) {
GST_ERROR_OBJECT (dtmfsrc, "Failed to wait on clock %s",
@@ -660,10 +660,6 @@ gst_rtp_dtmf_prepare_buffer_data (GstRTPDTMFSrc *dtmfsrc, GstBuffer *buf)
gst_rtp_dtmf_prepare_rtp_headers (dtmfsrc, buf);
- /* duration of DTMF payload */
- dtmfsrc->payload->duration +=
- dtmfsrc->interval * dtmfsrc->clock_rate / 1000;
-
/* timestamp and duration of GstBuffer */
GST_BUFFER_DURATION (buf) = dtmfsrc->interval * GST_MSECOND;
GST_BUFFER_TIMESTAMP (buf) = dtmfsrc->timestamp;
@@ -674,6 +670,11 @@ gst_rtp_dtmf_prepare_buffer_data (GstRTPDTMFSrc *dtmfsrc, GstBuffer *buf)
/* copy payload and convert to network-byte order */
g_memmove (payload, dtmfsrc->payload, sizeof (GstRTPDTMFPayload));
payload->duration = g_htons (payload->duration);
+
+ /* duration of DTMF payload */
+ dtmfsrc->payload->duration +=
+ dtmfsrc->interval * dtmfsrc->clock_rate / 1000;
+
}
static GstBuffer *