From f543094002596ac6bbf16396f200f0d2309a7c75 Mon Sep 17 00:00:00 2001 From: Jacek Skiba Date: Mon, 27 Mar 2023 11:19:29 +0200 Subject: [PATCH] [HUMAXEOS-4885]: Fix artifacts on STV at the end of the movie Configure sink to not drop buffers which are outside the current segment. This way we do not lost video frames which are valid. Example of currently dropped buffer: - gst segment stop time: 1:30:00.00 - gst buffer dts: 1:29:59.80, pts: 1:30:00.04 Current buffer is dropped because pts (1:30:00.04) is higher then gst stop time (1:30:00.00). This condition is too strict for STV content. We don't see also that strict requirement in Dash specification. --- .../platform/graphics/gstreamer/mse/AppendPipeline.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp b/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp index 82393566b1ef6..7a2f98d7508a3 100644 --- a/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp +++ b/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp @@ -255,6 +255,12 @@ AppendPipeline::AppendPipeline(Ref mediaSourceCli gst_base_sink_set_sync(GST_BASE_SINK(m_appsink.get()), FALSE); gst_base_sink_set_last_sample_enabled(GST_BASE_SINK(m_appsink.get()), FALSE); + bool disableClipping = getenv("DISABLE_CLIPPING") != nullptr && *getenv("DISABLE_CLIPPING") == '1'; + if (disableClipping) { + GST_DEBUG("Disabling clipping basesink feature"); + gst_base_sink_set_drop_out_of_segment(GST_BASE_SINK(m_appsink.get()), FALSE); + } + GRefPtr appsinkPad = adoptGRef(gst_element_get_static_pad(m_appsink.get(), "sink")); g_signal_connect(appsinkPad.get(), "notify::caps", G_CALLBACK(appendPipelineAppsinkCapsChanged), this);