don't trust emby's anamorphic flag (#1321)

This commit is contained in:
Jason Dove
2023-06-22 20:07:58 -05:00
committed by GitHub
parent 20a6727158
commit 4af2d7aa61
2 changed files with 6 additions and 5 deletions

View File

@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Properly scale subtitles when using hardware acceleration
- Fix color normalization of content with missing color metadata when using NVIDIA acceleration
- `VAAPI`: explicitly use `CQP` rate control mode when it's the only compatible mode
- Fix scaling anamorphic Emby content that Emby claims is not anamorphic
### Changed
- `HLS Direct` streaming mode

View File

@@ -820,11 +820,7 @@ public class EmbyApiClient : IEmbyApiClient
int height = videoStream.Height ?? 1;
var isAnamorphic = false;
if (videoStream.IsAnamorphic.HasValue)
{
isAnamorphic = videoStream.IsAnamorphic.Value;
}
else if (!string.IsNullOrWhiteSpace(videoStream.AspectRatio) && videoStream.AspectRatio.Contains(":"))
if (!string.IsNullOrWhiteSpace(videoStream.AspectRatio) && videoStream.AspectRatio.Contains(":"))
{
// if width/height != aspect ratio, is anamorphic
double resolutionRatio = width / (double)height;
@@ -836,6 +832,10 @@ public class EmbyApiClient : IEmbyApiClient
isAnamorphic = Math.Abs(resolutionRatio - aspectRatio) > 0.01d;
}
else if (videoStream.IsAnamorphic.HasValue)
{
isAnamorphic = videoStream.IsAnamorphic.Value;
}
var version = new MediaVersion
{