rtpgstpay: Set DELTA_UNIT flag when appropriate
authorMathieu Duponchelle <mathieu@centricular.com>
Tue, 13 Nov 2018 20:23:30 +0000 (21:23 +0100)
committerMathieu Duponchelle <mathieu@centricular.com>
Thu, 4 Apr 2019 17:08:23 +0000 (19:08 +0200)
When used in combination with a rtponviftimestamp element
downstream, forwarding this flag ensures it gets correctly
serialized in the ONVIF header extension.

gst/rtp/gstrtpgstpay.c

index f2cfb36..c1aa439 100644 (file)
@@ -339,6 +339,9 @@ gst_rtp_gst_pay_create_from_adapter (GstRtpGSTPay * rtpgstpay,
     GST_DEBUG_OBJECT (rtpgstpay, "take %u bytes from adapter", payload_len);
     paybuf = gst_adapter_take_buffer_fast (rtpgstpay->adapter, payload_len);
 
+    if (GST_BUFFER_FLAG_IS_SET (paybuf, GST_BUFFER_FLAG_DELTA_UNIT))
+      GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DELTA_UNIT);
+
     /* create a new group to hold the rtp header and the payload */
     gst_rtp_copy_meta (GST_ELEMENT_CAST (rtpgstpay), outbuf, paybuf, 0);
     outbuf = gst_buffer_append (outbuf, paybuf);