Commit 42ff6423 authored by Guillaume Desmottes's avatar Guillaume Desmottes Committed by Wim Taymans

gstrtpmp4gpay: propagate the GST_BUFFER_FLAG_DISCONT flag

Propagate the DISCONT flag to the first RTP packet being used to transfer
a DISCONT buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=730563
parent 9a7479fb
......@@ -543,6 +543,12 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay)
rtpmp4gpay->offset += rtpmp4gpay->frame_len;
}
if (rtpmp4gpay->discont) {
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
/* Only the first outputted buffer has the DISCONT flag */
rtpmp4gpay->discont = FALSE;
}
ret = gst_rtp_base_payload_push (GST_RTP_BASE_PAYLOAD (rtpmp4gpay), outbuf);
avail -= payload_len;
......@@ -563,6 +569,7 @@ gst_rtp_mp4g_pay_handle_buffer (GstRTPBasePayload * basepayload,
rtpmp4gpay->first_timestamp = GST_BUFFER_TIMESTAMP (buffer);
rtpmp4gpay->first_duration = GST_BUFFER_DURATION (buffer);
rtpmp4gpay->discont = GST_BUFFER_IS_DISCONT (buffer);
/* we always encode and flush a full AU */
gst_adapter_push (rtpmp4gpay->adapter, buffer);
......
......@@ -47,6 +47,7 @@ struct _GstRtpMP4GPay
GstAdapter *adapter;
GstClockTime first_timestamp;
GstClockTime first_duration;
gboolean discont;
GstClockTime duration;
guint64 offset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment