Skip to content

Commit 38147cd

Browse files
author
Volodymyr Ogorodnik
committed
[ARRISAPOL-3803] Notify buffering state also in pipeline state transition
1 parent 5e3487e commit 38147cd

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
@@ -2742,6 +2742,13 @@ void MediaPlayerPrivateGStreamer::updateStates()
27422742
case GST_STATE_CHANGE_ASYNC:
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.
2745+
//If we are buffering now, we could miss HaveCurrentData state if buffering finished before the transition complete.
2746+
if (m_isBuffering)
2747+
{
2748+
GST_INFO_OBJECT(pipeline(), "Async: [Buffering] still buffering, so force HaveCurrentData.");
2749+
m_readyState = MediaPlayer::ReadyState::HaveCurrentData;
2750+
m_networkState = MediaPlayer::NetworkState::Loading;
2751+
}
27452752

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.

0 commit comments

Comments
 (0)