diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpac3pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpac3pay.c index efce5b54b2..478c4a378e 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpac3pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpac3pay.c @@ -322,8 +322,10 @@ gst_rtp_ac3_pay_flush (GstRtpAC3Pay * rtpac3pay) payload[1] = NF; payload_len -= 2; - if (avail == payload_len) + if (avail == payload_len) { gst_rtp_buffer_set_marker (&rtp, TRUE); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); + } gst_rtp_buffer_unmap (&rtp); payload_buffer = diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpamrpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpamrpay.c index bf92a5483b..1473485555 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpamrpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpamrpay.c @@ -333,6 +333,7 @@ gst_rtp_amr_pay_handle_buffer (GstRTPBasePayload * basepayload, if (GST_BUFFER_IS_DISCONT (buffer)) { GST_DEBUG_OBJECT (basepayload, "discont, setting marker bit"); GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_set_marker (&rtp, TRUE); gst_rtp_amr_pay_recalc_rtp_time (rtpamrpay, timestamp); } diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpdvpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpdvpay.c index 2a0e92e66d..24bb9b41cd 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpdvpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpdvpay.c @@ -372,6 +372,7 @@ gst_rtp_dv_pay_handle_buffer (GstRTPBasePayload * basepayload, /* set marker */ gst_rtp_buffer_set_marker (&rtp, TRUE); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); /* shrink buffer to last packet */ hlen = gst_rtp_buffer_get_header_len (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpg723pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpg723pay.c index ebe7343d95..0c5fd1bddd 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpg723pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpg723pay.c @@ -164,6 +164,7 @@ gst_rtp_g723_pay_flush (GstRTPG723Pay * pay) /* set discont and marker */ if (pay->discont) { GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_set_marker (&rtp, TRUE); pay->discont = FALSE; } diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpg729pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpg729pay.c index 18e2bad8ec..bc158c1f80 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpg729pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpg729pay.c @@ -189,6 +189,7 @@ gst_rtp_g729_pay_push (GstRTPG729Pay * rtpg729pay, GstBuffer * buf) if (G_UNLIKELY (rtpg729pay->discont)) { GST_DEBUG_OBJECT (basepayload, "discont, setting marker bit"); GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_set_marker (&rtp, TRUE); rtpg729pay->discont = FALSE; } diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c index 81ff4a4d46..c76a38e1cf 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c @@ -335,8 +335,10 @@ gst_rtp_gst_pay_create_from_adapter (GstRtpGSTPay * rtpgstpay, frag_offset += payload_len; avail -= payload_len; - if (avail == 0) + if (avail == 0) { gst_rtp_buffer_set_marker (&rtp, TRUE); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); + } gst_rtp_buffer_unmap (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph261pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph261pay.c index 18143252ce..a7c9033bba 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph261pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph261pay.c @@ -844,6 +844,8 @@ gst_rtp_h261_pay_fragment_push (GstRtpH261Pay * pay, GstBuffer * buffer, bits + GST_ROUND_DOWN_8 (start) / 8, nbytes); GST_BUFFER_TIMESTAMP (outbuf) = pay->timestamp; + if (marker) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_set_marker (&rtp, marker); pay->offset = end & 7; diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph263pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph263pay.c index b7239f49ba..f89843a5b7 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph263pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph263pay.c @@ -1311,8 +1311,10 @@ gst_rtp_h263_pay_push (GstRtpH263Pay * rtph263pay, GST_BUFFER_PTS (package->outbuf) = rtph263pay->first_ts; gst_rtp_buffer_set_marker (&rtp, package->marker); - if (package->marker) + if (package->marker) { + GST_BUFFER_FLAG_SET (package->outbuf, GST_BUFFER_FLAG_MARKER); GST_DEBUG_OBJECT (rtph263pay, "Marker set!"); + } gst_rtp_buffer_unmap (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph263ppay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph263ppay.c index 5e4aac0550..b6d8040aea 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph263ppay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph263ppay.c @@ -742,6 +742,8 @@ gst_rtp_h263p_pay_flush (GstRtpH263PPay * rtph263ppay) gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); /* last fragment gets the marker bit set */ gst_rtp_buffer_set_marker (&rtp, avail > towrite ? 0 : 1); + if (avail <= towrite) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); payload = gst_rtp_buffer_get_payload (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c index 5df5b8badc..de476e64e9 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph264pay.c @@ -1085,6 +1085,8 @@ gst_rtp_h264_pay_payload_nal_fragment (GstRTPBasePayload * basepayload, /* If it's the last fragment and the end of this au, mark the end of * slice */ gst_rtp_buffer_set_marker (&rtp, last_fragment && end_of_au); + if (last_fragment && end_of_au) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); /* FU indicator */ payload[0] = (nal_header & 0x60) | FU_A_TYPE_ID; @@ -1142,6 +1144,8 @@ gst_rtp_h264_pay_payload_nal_single (GstRTPBasePayload * basepayload, /* Mark the end of a frame */ gst_rtp_buffer_set_marker (&rtp, end_of_au); + if (end_of_au) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); /* timestamp the outbuffer */ GST_BUFFER_PTS (outbuf) = pts; diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c index 9c195152bc..054af1408a 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtph265pay.c @@ -1140,6 +1140,7 @@ gst_rtp_h265_pay_payload_nal_single (GstRTPBasePayload * basepayload, /* Mark the end of a frame */ gst_rtp_buffer_set_marker (&rtp, marker); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); /* timestamp the outbuffer */ GST_BUFFER_PTS (outbuf) = pts; @@ -1224,6 +1225,8 @@ gst_rtp_h265_pay_payload_nal_fragment (GstRTPBasePayload * basepayload, /* If it's the last fragment and the end of this au, mark the end of * slice */ gst_rtp_buffer_set_marker (&rtp, last_fragment && marker); + if (last_fragment && marker) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); /* FU Header */ payload[2] = (first_fragment << 7) | (last_fragment << 6) | diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpj2kpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpj2kpay.c index 1fb35164cd..90075d06c5 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpj2kpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpj2kpay.c @@ -459,6 +459,7 @@ gst_rtp_j2k_pay_handle_buffer (GstRTPBasePayload * basepayload, /* reached the end of a packetization unit */ if (pu_size == 0 && end >= map.size) { gst_rtp_buffer_set_marker (&rtp, TRUE); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); } /* If we were processing a header, see if all fits in one RTP packet or if we have to fragment it */ diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpjpegpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpjpegpay.c index 0e32e16fb2..1f7b8d8c95 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpjpegpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpjpegpay.c @@ -899,6 +899,7 @@ gst_rtp_jpeg_pay_handle_buffer (GstRTPBasePayload * basepayload, GST_LOG_OBJECT (pay, "last packet of frame"); frame_done = TRUE; gst_rtp_buffer_set_marker (&rtp, 1); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); } payload = gst_rtp_buffer_get_payload (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpklvpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpklvpay.c index 03a59a9160..00f1f43213 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpklvpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpklvpay.c @@ -157,6 +157,7 @@ gst_rtp_klv_pay_handle_buffer (GstRTPBasePayload * basepayload, GstBuffer * buf) gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); gst_rtp_buffer_set_marker (&rtp, 1); gst_rtp_buffer_unmap (&rtp); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); } GST_LOG_OBJECT (pay, "packet with payload size %u", payload_size); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4apay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4apay.c index bd37062287..f94bb723d6 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4apay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4apay.c @@ -432,6 +432,8 @@ gst_rtp_mp4a_pay_handle_buffer (GstRTPBasePayload * basepayload, /* marker only if the packet is complete */ gst_rtp_buffer_set_marker (&rtp, size == payload_len); + if (size == payload_len) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_unmap (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gpay.c index 7e61e9f20d..2434d90357 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4gpay.c @@ -534,6 +534,8 @@ gst_rtp_mp4g_pay_flush (GstRtpMP4GPay * rtpmp4gpay) /* marker only if the packet is complete */ gst_rtp_buffer_set_marker (&rtp, avail <= payload_len); + if (avail <= payload_len) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_unmap (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4vpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4vpay.c index f6a4229703..530df853d3 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4vpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpmp4vpay.c @@ -297,6 +297,8 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay) gst_rtp_buffer_map (outbuf, GST_MAP_WRITE, &rtp); gst_rtp_buffer_set_marker (&rtp, avail == 0); + if (avail == 0) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_unmap (&rtp); gst_rtp_copy_video_meta (rtpmp4vpay, outbuf, outbuf_data); outbuf = gst_buffer_append (outbuf, outbuf_data); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpmpapay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpmpapay.c index 87ff430fdc..2c59a85e64 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpmpapay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpmpapay.c @@ -242,8 +242,10 @@ gst_rtp_mpa_pay_flush (GstRtpMPAPay * rtpmpapay) avail -= payload_len; frag_offset += payload_len; - if (avail == 0) + if (avail == 0) { gst_rtp_buffer_set_marker (&rtp, TRUE); + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); + } gst_rtp_buffer_unmap (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpmpvpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpmpvpay.c index ef8b4a654a..9d3f30f1c5 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpmpvpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpmpvpay.c @@ -234,6 +234,8 @@ gst_rtp_mpv_pay_flush (GstRTPMPVPay * rtpmpvpay) avail -= payload_len; gst_rtp_buffer_set_marker (&rtp, avail == 0); + if (avail == 0) + GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_unmap (&rtp); paybuf = gst_adapter_take_buffer_fast (rtpmpvpay->adapter, payload_len); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpreddec.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpreddec.c index b4ff0d1999..6c7ba363f4 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpreddec.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpreddec.c @@ -313,6 +313,8 @@ gst_rtp_red_create_packet (GstRtpRedDec * self, GstRTPBuffer * red_rtp, /* Timestamps, meta, flags from the RED packet should go to main block packet */ gst_buffer_copy_into (ret, red_rtp->buffer, GST_BUFFER_COPY_METADATA, 0, -1); + if (marker) + GST_BUFFER_FLAG_SET (ret, GST_BUFFER_FLAG_MARKER); return ret; } diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpvp8pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpvp8pay.c index 61bfcd6b2b..f4b4031d6e 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpvp8pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpvp8pay.c @@ -548,6 +548,8 @@ gst_rtp_vp8_create_header_buffer (GstRtpVP8Pay * self, guint8 partid, } gst_rtp_buffer_set_marker (&rtpbuffer, mark); + if (mark) + GST_BUFFER_FLAG_SET (out, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_unmap (&rtpbuffer); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpvp9pay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpvp9pay.c index 447a429f16..0d29ac992e 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpvp9pay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpvp9pay.c @@ -432,6 +432,8 @@ gst_rtp_vp9_create_header_buffer (GstRtpVP9Pay * self, g_assert_cmpint (off, ==, hdrlen); gst_rtp_buffer_set_marker (&rtpbuffer, mark); + if (mark) + GST_BUFFER_FLAG_SET (out, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_unmap (&rtpbuffer); diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpvrawpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpvrawpay.c index 1b19cdba1c..b2f807867a 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpvrawpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpvrawpay.c @@ -566,6 +566,7 @@ gst_rtp_vraw_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer) if (line >= height) { GST_LOG_OBJECT (rtpvrawpay, "field/frame complete, set marker"); gst_rtp_buffer_set_marker (&rtp, TRUE); + GST_BUFFER_FLAG_SET (out, GST_BUFFER_FLAG_MARKER); complete = TRUE; } gst_rtp_buffer_unmap (&rtp); diff --git a/subprojects/gst-plugins-good/gst/rtp/rtpulpfeccommon.c b/subprojects/gst-plugins-good/gst/rtp/rtpulpfeccommon.c index 25b2f00f14..10687fc12d 100644 --- a/subprojects/gst-plugins-good/gst/rtp/rtpulpfeccommon.c +++ b/subprojects/gst-plugins-good/gst/rtp/rtpulpfeccommon.c @@ -310,6 +310,8 @@ rtp_ulpfec_bitstring_to_fec_rtp_buffer (GArray * arr, g_assert_not_reached (); gst_rtp_buffer_set_marker (&rtp, marker); + if (marker) + GST_BUFFER_FLAG_SET (ret, GST_BUFFER_FLAG_MARKER); gst_rtp_buffer_set_payload_type (&rtp, pt); gst_rtp_buffer_set_seq (&rtp, seq); gst_rtp_buffer_set_timestamp (&rtp, timestamp); diff --git a/subprojects/gst-plugins-good/tests/check/elements/rtpred.c b/subprojects/gst-plugins-good/tests/check/elements/rtpred.c index 5e65649c34..99b08fdd7a 100644 --- a/subprojects/gst-plugins-good/tests/check/elements/rtpred.c +++ b/subprojects/gst-plugins-good/tests/check/elements/rtpred.c @@ -167,7 +167,8 @@ GST_START_TEST (rtpreddec_main_block) bufout = gst_harness_push_and_pull (h, bufinp); fail_unless (gst_rtp_buffer_map (bufout, GST_MAP_READ, &rtp)); fail_unless_equals_int (GST_BUFFER_TIMESTAMP (bufout), gst_ts); - fail_unless_equals_int (GST_BUFFER_FLAGS (bufout), bufinp_flags); + fail_unless_equals_int (GST_BUFFER_FLAGS (bufout), + bufinp_flags | GST_BUFFER_FLAG_MARKER); fail_unless_equals_int (gst_buffer_get_size (bufout), gst_rtp_buffer_calc_packet_len (sizeof (out_data), 0, csrc_count)); fail_unless_equals_int (gst_rtp_buffer_get_timestamp (&rtp),