Title: [236325] releases/WebKitGTK/webkit-2.22/Source/WebCore
Revision
236325
Author
ape...@igalia.com
Date
2018-09-21 10:04:13 -0700 (Fri, 21 Sep 2018)

Log Message

Merge r236264 - [GStreamer][MSE] Add a default sample duration
https://bugs.webkit.org/show_bug.cgi?id=189788

Some WebM files don't provide sample durations, so we need to provide
a safe default in order for them to be playable.

Reviewed by Michael Catanzaro.

* platform/graphics/gstreamer/MediaSampleGStreamer.cpp:
(WebCore::MediaSampleGStreamer::MediaSampleGStreamer):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog (236324 => 236325)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-09-21 17:04:06 UTC (rev 236324)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/ChangeLog	2018-09-21 17:04:13 UTC (rev 236325)
@@ -1,5 +1,18 @@
 2018-09-20  Alicia Boya García  <ab...@igalia.com>
 
+        [GStreamer][MSE] Add a default sample duration
+        https://bugs.webkit.org/show_bug.cgi?id=189788
+
+        Some WebM files don't provide sample durations, so we need to provide
+        a safe default in order for them to be playable.
+
+        Reviewed by Michael Catanzaro.
+
+        * platform/graphics/gstreamer/MediaSampleGStreamer.cpp:
+        (WebCore::MediaSampleGStreamer::MediaSampleGStreamer):
+
+2018-09-20  Alicia Boya García  <ab...@igalia.com>
+
         [MSE] Use some tolerance when deciding whether a frame should be appended to the decode queue
         https://bugs.webkit.org/show_bug.cgi?id=189782
 

Modified: releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp (236324 => 236325)


--- releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp	2018-09-21 17:04:06 UTC (rev 236324)
+++ releases/WebKitGTK/webkit-2.22/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp	2018-09-21 17:04:13 UTC (rev 236325)
@@ -50,6 +50,14 @@
         m_dts = createMediaTime(GST_BUFFER_DTS_OR_PTS(buffer));
     if (GST_BUFFER_DURATION_IS_VALID(buffer))
         m_duration = createMediaTime(GST_BUFFER_DURATION(buffer));
+    else {
+        // Unfortunately, sometimes samples don't provide a duration. This can never happen in MP4 because of the way
+        // the format is laid out, but it's pretty common in WebM.
+        // The good part is that durations don't matter for playback, just for buffered ranges and coded frame deletion.
+        // We want to pick something small enough to not cause unwanted frame deletion, but big enough to never be
+        // mistaken for a rounding artifact.
+        m_duration = createMediaTime(16666667); // 1/60 seconds
+    }
 
     m_size = gst_buffer_get_size(buffer);
     m_sample = sample;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to