Title: [236264] trunk/Source/WebCore
- Revision
- 236264
- Author
- [email protected]
- Date
- 2018-09-20 09:46:58 -0700 (Thu, 20 Sep 2018)
Log Message
[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: trunk/Source/WebCore/ChangeLog (236263 => 236264)
--- trunk/Source/WebCore/ChangeLog 2018-09-20 16:32:14 UTC (rev 236263)
+++ trunk/Source/WebCore/ChangeLog 2018-09-20 16:46:58 UTC (rev 236264)
@@ -1,5 +1,18 @@
2018-09-20 Alicia Boya García <[email protected]>
+ [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 <[email protected]>
+
[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: trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp (236263 => 236264)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp 2018-09-20 16:32:14 UTC (rev 236263)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MediaSampleGStreamer.cpp 2018-09-20 16:46:58 UTC (rev 236264)
@@ -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
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes