don't trust emby's anamorphic flag (#1321)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user