[GStreamer] Return a valid time values in unprerolled states
authorcturner@igalia.com <cturner@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jul 2018 14:51:15 +0000 (14:51 +0000)
committercturner@igalia.com <cturner@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jul 2018 14:51:15 +0000 (14:51 +0000)
commitc819009145f6d42d71328a9892951c7db1e94cdf
tree673053ac3e062decba72eed1d32f8d25b1c4e8a3
parent326754fba51561469e6ec6d17a4e02cc568e0ff3
[GStreamer] Return a valid time values in unprerolled states
https://bugs.webkit.org/show_bug.cgi?id=187111

Reviewed by Xabier Rodriguez-Calvar.

After r230584 in bug 180253, asserts were added in
PlatformTimeRanges::add to check that both ends of the range were
valid times. In the non-MSE GStreamer player, this assert was
firing on https://www.w3.org/2010/05/video/mediaevents.html due to
seekable being called in nonprerolled states. In this case
MediaPlayerPrivateInterface::seekable was calling GStreamer's
maxTimeSeekable, which calls in durationMediaTime. The guard
against calling gst_element_query_duration when not prerolled was
returning a different time value than when the duration query
itself failed. Hence the assert firing.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp