From 016d2b08e382e14c7382d869ee51ce82006e1b95 Mon Sep 17 00:00:00 2001 From: xperia64 Date: Wed, 10 Jun 2020 19:42:23 -0400 Subject: [PATCH] Fix ffmpeg time base --- src/core/dumping/ffmpeg_backend.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/dumping/ffmpeg_backend.cpp b/src/core/dumping/ffmpeg_backend.cpp index 2816190c0..e097ecbc6 100644 --- a/src/core/dumping/ffmpeg_backend.cpp +++ b/src/core/dumping/ffmpeg_backend.cpp @@ -9,6 +9,7 @@ #include "common/param_package.h" #include "common/string_util.h" #include "core/dumping/ffmpeg_backend.h" +#include "core/hw/gpu.h" #include "core/settings.h" #include "video_core/renderer_base.h" #include "video_core/video_core.h" @@ -127,8 +128,8 @@ bool FFmpegVideoStream::Init(FFmpegMuxer& muxer, const Layout::FramebufferLayout // TODO(xperia64): Replace with the core timing derived refresh rate // Verify that an FPS of 59.83... can actually be requested // (this doesn't seem to be working currently) - codec_context->time_base.num = 1000000; - codec_context->time_base.den = 59833997; + codec_context->time_base.num = static_cast(GPU::frame_ticks); + codec_context->time_base.den = static_cast(BASE_CLOCK_RATE_ARM11); codec_context->gop_size = 12; codec_context->pix_fmt = codec->pix_fmts ? codec->pix_fmts[0] : AV_PIX_FMT_YUV420P; if (format_context->oformat->flags & AVFMT_GLOBALHEADER)