Title: [179577] trunk/Source/WebCore
Revision
179577
Author
[email protected]
Date
2015-02-03 16:07:49 -0800 (Tue, 03 Feb 2015)

Log Message

[MSE] Setting timestampOffset does not change the timestamps in the actual sample, leading to visual and audible errors.
https://bugs.webkit.org/show_bug.cgi?id=140929

Reviewed by Alexey Proskuryakov.

Fixes http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html.

Only apply the timestamp offset to the actual sample after step 1.6, where we may loop back to
the top, to avoid double-offsetting the same sample.

* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (179576 => 179577)


--- trunk/Source/WebCore/ChangeLog	2015-02-04 00:00:00 UTC (rev 179576)
+++ trunk/Source/WebCore/ChangeLog	2015-02-04 00:07:49 UTC (rev 179577)
@@ -1,3 +1,18 @@
+2015-02-03  Jer Noble  <[email protected]>
+
+        [MSE] Setting timestampOffset does not change the timestamps in the actual sample, leading to visual and audible errors.
+        https://bugs.webkit.org/show_bug.cgi?id=140929
+
+        Reviewed by Alexey Proskuryakov.
+
+        Fixes http/tests/media/media-source/mediasource-config-change-mp4-v-framerate.html.
+
+        Only apply the timestamp offset to the actual sample after step 1.6, where we may loop back to
+        the top, to avoid double-offsetting the same sample.
+
+        * Modules/mediasource/SourceBuffer.cpp:
+        (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
+
 2015-02-03  Jeremy Jones  <[email protected]>
 
         Restore interface before exiting optimized fullscreen mode.

Modified: trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp (179576 => 179577)


--- trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2015-02-04 00:00:00 UTC (rev 179576)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBuffer.cpp	2015-02-04 00:07:49 UTC (rev 179577)
@@ -1352,9 +1352,6 @@
 
             // 1.4.2 Add timestampOffset to the decode timestamp.
             decodeTimestamp += m_timestampOffset;
-
-            // Reflect the new timestamps back into the sample.
-            sample->offsetTimestampsBy(m_timestampOffset);
         }
 
         // 1.5 Let track buffer equal the track buffer that the coded frame will be added to.
@@ -1398,6 +1395,11 @@
             continue;
         }
 
+        if (m_timestampOffset) {
+            // Reflect the new timestamps back into the sample.
+            sample->offsetTimestampsBy(m_timestampOffset);
+        }
+
         // 1.7 Let frame end timestamp equal the sum of presentation timestamp and frame duration.
         MediaTime frameEndTimestamp = presentationTimestamp + frameDuration;
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to