Skip to content

Commit 058f570

Browse files
Merge pull request #516 from LibertyGlobal/vogorodnik/ARRISAPOL-3803_euronews_fix
[ARRISAPOL-3803] Notify buffering state also in pipeline state transition
2 parents 5e3487e + 00248c7 commit 058f570

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2743,6 +2743,13 @@ void MediaPlayerPrivateGStreamer::updateStates()
27432743
GST_DEBUG_OBJECT(pipeline(), "Async: State: %s, pending: %s", gst_element_state_get_name(m_currentState), gst_element_state_get_name(pending));
27442744
// Change in progress.
27452745

2746+
if (m_currentState == GST_STATE_PAUSED && m_isBuffering) {
2747+
// If we are buffering, we could miss HaveCurrentData state if buffering finished before the transition completes.
2748+
GST_DEBUG_OBJECT(pipeline(), "Async: [Buffering] still buffering, so force HaveCurrentData.");
2749+
m_readyState = MediaPlayer::ReadyState::HaveCurrentData;
2750+
m_networkState = MediaPlayer::NetworkState::Loading;
2751+
}
2752+
27462753
// Delay the m_isBuffering change by returning it to its previous value. Without this, the false --> true change
27472754
// would go unnoticed by the code that should trigger a pause.
27482755
if (m_wasBuffering != m_isBuffering && !m_isPaused && m_playbackRate) {

0 commit comments

Comments
 (0)