From 519546aea30d4fc40408ce154fc5c2554e8ad279 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 16 Feb 2024 18:11:07 +0100 Subject: [PATCH] rtpgstpay: flush on EOS Part-of: --- subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c index 71e89e41bf..13fb7d1b1b 100644 --- a/subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c +++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpgstpay.c @@ -539,6 +539,11 @@ gst_rtp_gst_pay_sink_event (GstRTPBasePayload * payload, GstEvent * event) g_atomic_int_set (&rtpgstpay->force_config, TRUE); } + if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) { + // We must flush at this point, as no next input frame is expected + gst_rtp_gst_pay_flush (rtpgstpay, GST_CLOCK_TIME_NONE); + } + ret = GST_RTP_BASE_PAYLOAD_CLASS (parent_class)->sink_event (payload, gst_event_ref (event));