summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2006-02-09 17:04:18 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2006-02-09 17:04:18 +0000
commitfdaa7a7a00e03e14919ac59c92361aef96c9ee6a (patch)
tree06ca81ad8908d3844a4b96bbf3e08613c3ce40ba /gst-libs
parent369058452256e3bf1f49be48c95aab44dba56884 (diff)
gst-libs/gst/rtp/gstbasertppayload.c: update seqnum before setting it on the packet; this makes sure that the timesta...
Original commit message from CVS: * gst-libs/gst/rtp/gstbasertppayload.c: (gst_basertppayload_setcaps), (gst_basertppayload_push): update seqnum before setting it on the packet; this makes sure that the timestamp and seqnum properties match after pushing a buffer
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/rtp/gstbasertppayload.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gst-libs/gst/rtp/gstbasertppayload.c b/gst-libs/gst/rtp/gstbasertppayload.c
index f49797fa5..9b3018098 100644
--- a/gst-libs/gst/rtp/gstbasertppayload.c
+++ b/gst-libs/gst/rtp/gstbasertppayload.c
@@ -223,6 +223,7 @@ gst_basertppayload_setcaps (GstPad * pad, GstCaps * caps)
GstBaseRTPPayloadClass *basertppayload_class;
gboolean ret = TRUE;
+ GST_DEBUG_OBJECT (pad, "setting caps %" GST_PTR_FORMAT, caps);
basertppayload = GST_BASE_RTP_PAYLOAD (gst_pad_get_parent (pad));
basertppayload_class = GST_BASE_RTP_PAYLOAD_GET_CLASS (basertppayload);
@@ -377,7 +378,10 @@ gst_basertppayload_push (GstBaseRTPPayload * payload, GstBuffer * buffer)
gst_rtp_buffer_set_payload_type (buffer, payload->pt);
/* can wrap around, which is perfectly fine */
- gst_rtp_buffer_set_seq (buffer, payload->seqnum++);
+ /* update first, so that the property is set to the last
+ * seqnum pushed */
+ payload->seqnum++;
+ gst_rtp_buffer_set_seq (buffer, payload->seqnum);
/* add our random offset to the timestamp */
ts = payload->ts_base;