Browse Source

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

pull/1322/head
Jason Dove 2 years ago committed by GitHub
parent
commit
4af2d7aa61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 10
      ErsatzTV.Infrastructure/Emby/EmbyApiClient.cs

1
CHANGELOG.md

@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -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

10
ErsatzTV.Infrastructure/Emby/EmbyApiClient.cs

@ -820,11 +820,7 @@ public class EmbyApiClient : IEmbyApiClient @@ -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 @@ -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
{

Loading…
Cancel
Save