diff options
| author | gnattu <gnattu@users.noreply.github.com> | 2024-11-19 15:43:19 -0500 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2024-11-19 15:43:19 -0500 |
| commit | 4f562d67b036092891b24585527869ec8c64d7cc (patch) | |
| tree | cdf3b4b6a17f6d19ce1777362b968d348ddb7135 /MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | |
| parent | 6e7118eff1e6bc9c5ca70d80e5ff5e6eff7c90e5 (diff) | |
Backport pull request #12947 from jellyfin/release-10.10.z
Add a small tolerance value to remux fps check
Original-merge: 954950dc145db4edf85cc2c1e3ce068274097b71
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs')
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 28f0d1fff..eaae34cad 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2196,7 +2196,10 @@ namespace MediaBrowser.Controller.MediaEncoding { var videoFrameRate = videoStream.ReferenceFrameRate; - if (!videoFrameRate.HasValue || videoFrameRate.Value > requestedFramerate.Value) + // Add a little tolerance to the framerate check because some videos might record a framerate + // that is slightly higher than the intended framerate, but the device can still play it correctly. + // 0.05 fps tolerance should be safe enough. + if (!videoFrameRate.HasValue || videoFrameRate.Value > requestedFramerate.Value + 0.05f) { return false; } |
