mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
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
This commit is contained in:
parent
460ab3dd76
commit
9a7479fb0d
1 changed files with 8 additions and 0 deletions
|
@ -688,6 +688,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload,
|
||||||
gboolean sos_found, sof_found, dqt_found, dri_found;
|
gboolean sos_found, sof_found, dqt_found, dri_found;
|
||||||
gint i;
|
gint i;
|
||||||
GstBufferList *list = NULL;
|
GstBufferList *list = NULL;
|
||||||
|
gboolean discont;
|
||||||
|
|
||||||
pay = GST_RTP_JPEG_PAY (basepayload);
|
pay = GST_RTP_JPEG_PAY (basepayload);
|
||||||
mtu = GST_RTP_BASE_PAYLOAD_MTU (pay);
|
mtu = GST_RTP_BASE_PAYLOAD_MTU (pay);
|
||||||
|
@ -697,6 +698,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload,
|
||||||
size = map.size;
|
size = map.size;
|
||||||
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
discont = GST_BUFFER_IS_DISCONT (buffer);
|
||||||
|
|
||||||
GST_LOG_OBJECT (pay, "got buffer size %" G_GSIZE_FORMAT
|
GST_LOG_OBJECT (pay, "got buffer size %" G_GSIZE_FORMAT
|
||||||
" , timestamp %" GST_TIME_FORMAT, size, GST_TIME_ARGS (timestamp));
|
" , 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;
|
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 */
|
/* and add to list */
|
||||||
gst_buffer_list_insert (list, -1, outbuf);
|
gst_buffer_list_insert (list, -1, outbuf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue