From: Guillaume Desmottes Date: Tue, 20 May 2014 11:58:20 +0000 (+0200) Subject: rtpjpegpay: propagate the GST_BUFFER_FLAG_DISCONT flag X-Git-Tag: 1.3.3~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a7479fb0d7f32fd21892982ecfc7277d9513cc9;p=platform%2Fupstream%2Fgst-plugins-good.git rtpjpegpay: 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 --- diff --git a/gst/rtp/gstrtpjpegpay.c b/gst/rtp/gstrtpjpegpay.c index 4f58269..3e820a0 100644 --- a/gst/rtp/gstrtpjpegpay.c +++ b/gst/rtp/gstrtpjpegpay.c @@ -688,6 +688,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload, gboolean sos_found, sof_found, dqt_found, dri_found; gint i; GstBufferList *list = NULL; + gboolean discont; pay = GST_RTP_JPEG_PAY (basepayload); mtu = GST_RTP_BASE_PAYLOAD_MTU (pay); @@ -697,6 +698,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload, size = map.size; timestamp = GST_BUFFER_TIMESTAMP (buffer); offset = 0; + discont = GST_BUFFER_IS_DISCONT (buffer); GST_LOG_OBJECT (pay, "got buffer size %" G_GSIZE_FORMAT " , timestamp %" GST_TIME_FORMAT, size, GST_TIME_ARGS (timestamp)); @@ -895,6 +897,12 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload, GST_BUFFER_TIMESTAMP (outbuf) = timestamp; + if (discont) { + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); + /* Only the first outputted buffer has the DISCONT flag */ + discont = FALSE; + } + /* and add to list */ gst_buffer_list_insert (list, -1, outbuf);