summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2025-10-27 18:14:57 -0500
committerJordan Woyak <jordan.woyak@gmail.com>2025-11-11 20:01:52 -0600
commitcc331feb020d71f109d41b7f841bd69caa96bbb3 (patch)
treed3e40a1a211a5d2e477bfe0d15d91e2f8302a0e8 /Source/Core/VideoCommon/FrameDumpFFMpeg.cpp
parentd4f68cb1647ca87e5364431f09ab38b3178ed3cd (diff)
VideoCommon: Make Presenter aware of the next swap time to eliminate unsafe usage of GetTicks() with ImmediateXFB + DualCore.
Diffstat (limited to 'Source/Core/VideoCommon/FrameDumpFFMpeg.cpp')
-rw-r--r--Source/Core/VideoCommon/FrameDumpFFMpeg.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp b/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp
index e0e61529f7..52d41549dd 100644
--- a/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp
+++ b/Source/Core/VideoCommon/FrameDumpFFMpeg.cpp
@@ -65,6 +65,7 @@ namespace
{
AVRational GetTimeBaseForCurrentRefreshRate(s64 max_denominator)
{
+ // TODO: GetTargetRefreshRate* are not safe from GPU thread.
auto& vi = Core::System::GetInstance().GetVideoInterface();
int num;
int den;
@@ -368,6 +369,7 @@ void FFMpegFrameDump::AddFrame(const FrameData& frame)
// Calculate presentation timestamp from ticks since start.
const s64 pts = av_rescale_q(
frame.state.ticks - m_context->start_ticks,
+ // TODO: GetTicksPerSecond is not safe from GPU thread.
AVRational{1, int(Core::System::GetInstance().GetSystemTimers().GetTicksPerSecond())},
m_context->codec->time_base);