From 41ac5f8d76ce11a852e4dafbf20ad57d63d55f96 Mon Sep 17 00:00:00 2001 From: gnattu Date: Tue, 17 Sep 2024 21:08:16 +0800 Subject: [PATCH] Fix subtitle dar comparison when number not exact (#12660) --- MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index b186e3e535..88aa888a1e 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -3015,7 +3015,7 @@ namespace MediaBrowser.Controller.MediaEncoding var subtitleDar = (double)subtitleWidth.Value / subtitleHeight.Value; // No need to add padding when DAR is the same -> 1080p PGSSUB on 2160p video - if (videoDar == subtitleDar) + if (Math.Abs(videoDar - subtitleDar) < 0.01f) { filters = @"scale,scale={0}:{1}:fast_bilinear"; }