gst-libs/gst/rtp/gstbasertpdepayload.c: Only copy timestamp on outgoing packets if the depayloader did not set one.
Original commit message from CVS: * gst-libs/gst/rtp/gstbasertpdepayload.c: (gst_base_rtp_depayload_chain), (gst_base_rtp_depayload_set_gst_timestamp): Only copy timestamp on outgoing packets if the depayloader did not set one. Also copy duration on outgoing packets.
This commit is contained in:
parent
70ad18deee
commit
2f0a269ddd
@ -1,3 +1,12 @@
|
|||||||
|
2007-09-19 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
|
* gst-libs/gst/rtp/gstbasertpdepayload.c:
|
||||||
|
(gst_base_rtp_depayload_chain),
|
||||||
|
(gst_base_rtp_depayload_set_gst_timestamp):
|
||||||
|
Only copy timestamp on outgoing packets if the depayloader did not set
|
||||||
|
one.
|
||||||
|
Also copy duration on outgoing packets.
|
||||||
|
|
||||||
2007-09-19 Wim Taymans <wim.taymans@gmail.com>
|
2007-09-19 Wim Taymans <wim.taymans@gmail.com>
|
||||||
|
|
||||||
* gst-libs/gst/rtp/gstbasertppayload.c: (copy_fixed),
|
* gst-libs/gst/rtp/gstbasertppayload.c: (copy_fixed),
|
||||||
|
@ -55,6 +55,7 @@ struct _GstBaseRTPDepayloadPrivate
|
|||||||
|
|
||||||
gboolean discont;
|
gboolean discont;
|
||||||
GstClockTime timestamp;
|
GstClockTime timestamp;
|
||||||
|
GstClockTime duration;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Filter signals and args */
|
/* Filter signals and args */
|
||||||
@ -260,6 +261,7 @@ gst_base_rtp_depayload_chain (GstPad * pad, GstBuffer * in)
|
|||||||
timestamp = gst_segment_to_running_time (&filter->segment, GST_FORMAT_TIME,
|
timestamp = gst_segment_to_running_time (&filter->segment, GST_FORMAT_TIME,
|
||||||
timestamp);
|
timestamp);
|
||||||
priv->timestamp = timestamp;
|
priv->timestamp = timestamp;
|
||||||
|
priv->duration = GST_BUFFER_DURATION (in);
|
||||||
|
|
||||||
bclass = GST_BASE_RTP_DEPAYLOAD_GET_CLASS (filter);
|
bclass = GST_BASE_RTP_DEPAYLOAD_GET_CLASS (filter);
|
||||||
|
|
||||||
@ -403,11 +405,19 @@ gst_base_rtp_depayload_set_gst_timestamp (GstBaseRTPDepayload * filter,
|
|||||||
guint32 rtptime, GstBuffer * buf)
|
guint32 rtptime, GstBuffer * buf)
|
||||||
{
|
{
|
||||||
GstBaseRTPDepayloadPrivate *priv;
|
GstBaseRTPDepayloadPrivate *priv;
|
||||||
|
GstClockTime timestamp, duration;
|
||||||
|
|
||||||
priv = filter->priv;
|
priv = filter->priv;
|
||||||
|
|
||||||
/* apply incomming timestamp to outgoing buffer */
|
timestamp = GST_BUFFER_TIMESTAMP (buf);
|
||||||
GST_BUFFER_TIMESTAMP (buf) = priv->timestamp;
|
duration = GST_BUFFER_DURATION (buf);
|
||||||
|
|
||||||
|
/* apply last incomming timestamp and duration to outgoing buffer if
|
||||||
|
* not otherwise set. */
|
||||||
|
if (!GST_CLOCK_TIME_IS_VALID (timestamp))
|
||||||
|
GST_BUFFER_TIMESTAMP (buf) = priv->timestamp;
|
||||||
|
if (!GST_CLOCK_TIME_IS_VALID (duration))
|
||||||
|
GST_BUFFER_DURATION (buf) = priv->duration;
|
||||||
|
|
||||||
/* if this is the first buffer send a NEWSEGMENT */
|
/* if this is the first buffer send a NEWSEGMENT */
|
||||||
if (filter->need_newsegment) {
|
if (filter->need_newsegment) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user