Title: [173771] trunk/Source/WebCore
- Revision
- 173771
- Author
- [email protected]
- Date
- 2014-09-19 13:53:15 -0700 (Fri, 19 Sep 2014)
Log Message
[MSE][Mac] work around AVSampleBufferRenderSynchronizer early callbacks
https://bugs.webkit.org/show_bug.cgi?id=136958
Reviewed by Jer Noble.
No new tests, we have been unable to come up with a test case that reproduces
this issue reliably.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged): Set the synchronizer
time to duration when the duration time observer is called early. Add more logging.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (173770 => 173771)
--- trunk/Source/WebCore/ChangeLog 2014-09-19 20:26:56 UTC (rev 173770)
+++ trunk/Source/WebCore/ChangeLog 2014-09-19 20:53:15 UTC (rev 173771)
@@ -1,3 +1,17 @@
+2014-09-19 Eric Carlson <[email protected]>
+
+ [MSE][Mac] work around AVSampleBufferRenderSynchronizer early callbacks
+ https://bugs.webkit.org/show_bug.cgi?id=136958
+
+ Reviewed by Jer Noble.
+
+ No new tests, we have been unable to come up with a test case that reproduces
+ this issue reliably.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
+ (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationChanged): Set the synchronizer
+ time to duration when the duration time observer is called early. Add more logging.
+
2014-09-19 Benjamin Poulain <[email protected]>
CSS JIT: allocate the minimum required register count in debug
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (173770 => 173771)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2014-09-19 20:26:56 UTC (rev 173770)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2014-09-19 20:53:15 UTC (rev 173771)
@@ -632,11 +632,23 @@
MediaTime duration = m_mediaSourcePrivate->duration();
auto weakThis = createWeakPtr();
NSArray* times = @[[NSValue valueWithCMTime:toCMTime(duration)]];
+
+ LOG(MediaSource, "MediaPlayerPrivateMediaSourceAVFObjC::durationChanged(%p) - duration = %s", this, toString(duration).utf8().data());
+
m_durationObserver = [m_synchronizer addBoundaryTimeObserverForTimes:times queue:dispatch_get_main_queue() usingBlock:[weakThis] {
- if (weakThis) {
- weakThis->pauseInternal();
- weakThis->m_player->timeChanged();
+ if (!weakThis)
+ return;
+
+ MediaTime now = weakThis->currentMediaTime();
+ LOG(MediaSource, "MediaPlayerPrivateMediaSourceAVFObjC::durationChanged(%p) - boundary time observer called, now = %s", weakThis.get(), toString(now).utf8().data());
+
+ weakThis->pauseInternal();
+ if (now < duration) {
+ LOG(MediaSource, " ERROR: boundary time observer called before duration!", weakThis.get());
+ [weakThis->m_synchronizer setRate:0 time:toCMTime(duration)];
}
+ weakThis->m_player->timeChanged();
+
}];
if (m_playing && duration <= currentMediaTime())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes