summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorzeeshan.ali@nokia.com <zeeshan.ali@nokia.com>2007-03-29 10:39:46 +0000
committerEdward Hervey <bilboed@bilboed.com>2009-02-21 17:47:57 +0100
commitf1609fe6e24dc985ba78410b89a9f81f6580178c (patch)
tree16459e60df8d27787f936c9f338948d1aa43daf4 /gst
parente158fabe85030a4acbf9c586d14b416eaa391655 (diff)
downloadgst-plugins-bad-f1609fe6e24dc985ba78410b89a9f81f6580178c.tar.gz
gst-plugins-bad-f1609fe6e24dc985ba78410b89a9f81f6580178c.tar.bz2
gst-plugins-bad-f1609fe6e24dc985ba78410b89a9f81f6580178c.zip
[MOVED FROM GST-P-FARSIGHT] Calculate the rtp ts before gst ts get incremented
20070329103946-65035-f74e3a0140c57e941444bb837d6053ad1c3cf567.gz
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpdtmf/gstrtpdtmfsrc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gst/rtpdtmf/gstrtpdtmfsrc.c b/gst/rtpdtmf/gstrtpdtmfsrc.c
index ad453d39..e658bc05 100644
--- a/gst/rtpdtmf/gstrtpdtmfsrc.c
+++ b/gst/rtpdtmf/gstrtpdtmfsrc.c
@@ -567,20 +567,21 @@ gst_rtp_dtmf_src_push_next_rtp_packet (GstRTPDTMFSrc *dtmfsrc)
}
dtmfsrc->seqnum++;
gst_rtp_buffer_set_seq (buf, dtmfsrc->seqnum);
+
+ /* timestamp of RTP header */
+ gst_rtp_dtmf_src_calc_rtp_timestamp (dtmfsrc);
+ gst_rtp_buffer_set_timestamp (buf, dtmfsrc->rtp_timestamp);
+
+ /* duration of DTMF payload */
+ dtmfsrc->payload->duration +=
+ DEFAULT_PACKET_INTERVAL * dtmfsrc->clock_rate / 1000;
/* timestamp and duration of GstBuffer */
GST_BUFFER_DURATION (buf) = DEFAULT_PACKET_INTERVAL * GST_MSECOND;
dtmfsrc->timestamp += GST_BUFFER_DURATION (buf);
GST_BUFFER_TIMESTAMP (buf) = dtmfsrc->timestamp;
- /* duration of DTMF payload */
- dtmfsrc->payload->duration +=
- DEFAULT_PACKET_INTERVAL * dtmfsrc->clock_rate / 1000;
-
payload = (GstRTPDTMFPayload *) gst_rtp_buffer_get_payload (buf);
- /* timestamp of RTP header */
- gst_rtp_dtmf_src_calc_rtp_timestamp (dtmfsrc);
- gst_rtp_buffer_set_timestamp (buf, dtmfsrc->rtp_timestamp);
/* copy payload and convert to network-byte order */
g_memmove (payload, dtmfsrc->payload, sizeof (GstRTPDTMFPayload));