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
This commit is contained in:
Thomas Vander Stichele 2006-02-09 17:04:18 +00:00
parent 3690584522
commit fdaa7a7a00
2 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,11 @@
2006-02-09 Thomas Vander Stichele <thomas at apestaart dot org>
* 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
2006-02-09 Andy Wingo <wingo@pobox.com>
* gst-libs/gst/audio/gstringbuffer.c

View file

@ -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;