| Index: Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
|
| index f744a9802030441e0816d3724ef0c94db346aad0..a17fc12125df9e81f9e4ac6a36d6b12f6a1ef70c 100644
|
| --- a/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/Source/core/html/HTMLMediaElement.cpp
|
| @@ -2081,7 +2081,10 @@ void HTMLMediaElement::setCurrentTime(double time, ExceptionState& exceptionStat
|
|
|
| double HTMLMediaElement::duration() const
|
| {
|
| - if (m_readyState < HAVE_METADATA)
|
| + // FIXME: remove m_player check once we figure out how m_player is going
|
| + // out of sync with readystate. m_player is cleared but readystate is not set
|
| + // to HAVE_NOTHING
|
| + if (!m_player || m_readyState < HAVE_METADATA)
|
| return std::numeric_limits<double>::quiet_NaN();
|
|
|
| // FIXME: Refactor so m_duration is kept current (in both MSE and
|
|
|