Title: [263962] trunk/Source/WebCore
Revision
263962
Author
[email protected]
Date
2020-07-06 00:42:30 -0700 (Mon, 06 Jul 2020)

Log Message

[MSE][GStreamer] Don't skip samples past media duration in AppendPipeline
https://bugs.webkit.org/show_bug.cgi?id=213888

Reviewed by Xabier Rodriguez-Calvar.

appsinkNewSample() contained code to skip samples whose presentation
time starts after media duration. This is paradoxical, because later
sourceBufferPrivateDidReceiveSample() extends media duration whenever
the presentation end time of the sample is past the original one.

It does not sound reasonable that samples extending the duration are
okay on one case but outright rejected in the other. Also, if it was
about skipping samples, sourceBufferPrivateDidReceiveSample() could do
it itself, and already does in other cases.

For all these reasons I was very doubtful of the need for this if()
and indeed removing this condition didn't cause any new test failure.

* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::appsinkNewSample):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (263961 => 263962)


--- trunk/Source/WebCore/ChangeLog	2020-07-06 00:59:30 UTC (rev 263961)
+++ trunk/Source/WebCore/ChangeLog	2020-07-06 07:42:30 UTC (rev 263962)
@@ -1,3 +1,26 @@
+2020-07-06  Alicia Boya GarcĂ­a  <[email protected]>
+
+        [MSE][GStreamer] Don't skip samples past media duration in AppendPipeline
+        https://bugs.webkit.org/show_bug.cgi?id=213888
+
+        Reviewed by Xabier Rodriguez-Calvar.
+
+        appsinkNewSample() contained code to skip samples whose presentation
+        time starts after media duration. This is paradoxical, because later
+        sourceBufferPrivateDidReceiveSample() extends media duration whenever
+        the presentation end time of the sample is past the original one.
+
+        It does not sound reasonable that samples extending the duration are
+        okay on one case but outright rejected in the other. Also, if it was
+        about skipping samples, sourceBufferPrivateDidReceiveSample() could do
+        it itself, and already does in other cases.
+
+        For all these reasons I was very doubtful of the need for this if()
+        and indeed removing this condition didn't cause any new test failure.
+
+        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
+        (WebCore::AppendPipeline::appsinkNewSample):
+
 2020-07-05  Commit Queue  <[email protected]>
 
         Unreviewed, reverting r263960.

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp (263961 => 263962)


--- trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2020-07-06 00:59:30 UTC (rev 263961)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2020-07-06 07:42:30 UTC (rev 263962)
@@ -470,13 +470,6 @@
         mediaSample->duration().toString().utf8().data(),
         mediaSample->presentationSize().width(), mediaSample->presentationSize().height());
 
-    // If we're beyond the duration, ignore this sample.
-    MediaTime duration = m_mediaSourceClient->duration();
-    if (duration.isValid() && !duration.indefiniteTime() && mediaSample->presentationTime() > duration) {
-        GST_DEBUG_OBJECT(m_pipeline.get(), "Detected sample (%s) beyond the duration (%s), discarding", mediaSample->presentationTime().toString().utf8().data(), duration.toString().utf8().data());
-        return;
-    }
-
     // Hack, rework when GStreamer >= 1.16 becomes a requirement:
     // We're not applying edit lists. GStreamer < 1.16 doesn't emit the correct segments to do so.
     // GStreamer fix in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/commit/c2a0da8096009f0f99943f78dc18066965be60f9
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to