From dfbad09315e7a3a6be8baaa50d32c35a4bf80dbc Mon Sep 17 00:00:00 2001 From: Zaggy1024 Date: Wed, 24 Sep 2025 13:48:21 -0500 Subject: [PATCH] LibMedia: Set the time base in FFmpegVideoDecoder Very minor change, which doesn't actually affect our output, since we were already inputting and outputting microseconds, but it can't hurt to give FFmpeg's decoder this information as well. --- Libraries/LibMedia/FFmpeg/FFmpegVideoDecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibMedia/FFmpeg/FFmpegVideoDecoder.cpp b/Libraries/LibMedia/FFmpeg/FFmpegVideoDecoder.cpp index f403497f417..77edfa8ddf2 100644 --- a/Libraries/LibMedia/FFmpeg/FFmpegVideoDecoder.cpp +++ b/Libraries/LibMedia/FFmpeg/FFmpegVideoDecoder.cpp @@ -60,7 +60,7 @@ DecoderErrorOr> FFmpegVideoDecoder::try_create return DecoderError::format(DecoderErrorCategory::Memory, "Failed to allocate FFmpeg codec context for codec {}", codec_id); codec_context->get_format = negotiate_output_format; - + codec_context->time_base = { 1, 1'000'000 }; codec_context->thread_count = static_cast(min(Core::System::hardware_concurrency(), 4)); if (!codec_initialization_data.is_empty()) {