summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-05-20 13:58:20 +0200
committerWim Taymans <wtaymans@redhat.com>2014-06-18 16:25:07 +0200
commit42ff6423728b4453aa8761e0753471a255421c3b (patch)
tree182daf0e6ab5ea169608f36de92cf5227f631c55
parent9a7479fb0d7f32fd21892982ecfc7277d9513cc9 (diff)
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
-rw-r--r--gst/rtp/gstrtpmp4gpay.c7
-rw-r--r--gst/rtp/gstrtpmp4gpay.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c
index 7913d9aba3..e374e5cd7c 100644
--- a/gst/rtp/gstrtpmp4gpay.c
+++ b/gst/rtp/gstrtpmp4gpay.c
@@ -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);
diff --git a/gst/rtp/gstrtpmp4gpay.h b/gst/rtp/gstrtpmp4gpay.h
index fed9c930b5..7506fad96d 100644
--- a/gst/rtp/gstrtpmp4gpay.h
+++ b/gst/rtp/gstrtpmp4gpay.h
@@ -47,6 +47,7 @@ struct _GstRtpMP4GPay
GstAdapter *adapter;
GstClockTime first_timestamp;
GstClockTime first_duration;
+ gboolean discont;
GstClockTime duration;
guint64 offset;