summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibVideo
diff options
context:
space:
mode:
authorZaggy1024 <zaggy1024@gmail.com>2022-11-14 05:40:59 -0600
committerAndreas Kling <kling@serenityos.org>2022-11-25 23:28:39 +0100
commitedec6bdc32dee9cb9af2951e8a4e26a94bdad6db (patch)
treebf1f0eebb179ab5148f395430cc55fdbf5122f30 /Userland/Libraries/LibVideo
parent75e20a5fd746c7749a460d29922683e7cd4c7553 (diff)
downloadserenity-edec6bdc32dee9cb9af2951e8a4e26a94bdad6db.zip
LibVideo: Make all PlaybackManager Timer::start calls set an interval
Timers keep their previously set interval even for single-shot mode. We want all timers to fire immediately if they don't have a delay set in the start() call.
Diffstat (limited to 'Userland/Libraries/LibVideo')
-rw-r--r--Userland/Libraries/LibVideo/PlaybackManager.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibVideo/PlaybackManager.cpp b/Userland/Libraries/LibVideo/PlaybackManager.cpp
index 51b717e8da..ef2a9fffca 100644
--- a/Userland/Libraries/LibVideo/PlaybackManager.cpp
+++ b/Userland/Libraries/LibVideo/PlaybackManager.cpp
@@ -60,7 +60,7 @@ void PlaybackManager::set_playback_status(PlaybackStatus status)
m_skipped_frames = 0;
}
m_last_present_in_real_time = Time::now_monotonic();
- m_present_timer->start();
+ m_present_timer->start(0);
} else {
m_last_present_in_media_time = current_playback_time();
m_last_present_in_real_time = Time::zero();
@@ -89,7 +89,7 @@ bool PlaybackManager::prepare_next_frame()
return false;
auto frame_item = m_frame_queue->dequeue();
m_next_frame.emplace(move(frame_item));
- m_decode_timer->start();
+ m_decode_timer->start(0);
return true;
}
@@ -170,7 +170,7 @@ void PlaybackManager::update_presented_frame()
}
set_playback_status(PlaybackStatus::Buffering);
- m_decode_timer->start();
+ m_decode_timer->start(0);
}
void PlaybackManager::restart_playback()
@@ -266,7 +266,7 @@ void PlaybackManager::on_decode_timer()
// Continually decode until buffering is complete
if (is_buffering())
- m_decode_timer->start();
+ m_decode_timer->start(0);
}
}