fix playback with unknown pixel format (#627)

This commit is contained in:
Jason Dove
2022-02-10 08:37:25 -06:00
committed by GitHub
parent 49d14b05f6
commit 9d99c19ea4
2 changed files with 5 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Fix incorrect watermark time calculations caused by working ahead in `HLS Segmenter`
- Fix ui crash adding empty path to local library
- Properly flag items as `File Not Found` when local library path (folder) is missing from disk
- Fix playback bug with unknown pixel format
### Added
- Include `Series` category tag for all episodes in XMLTV

View File

@@ -136,9 +136,12 @@ namespace ErsatzTV.Core.FFmpeg
public Option<FFmpegComplexFilter> Build(bool videoOnly, int videoInput, int videoStreamIndex, int audioInput, Option<int> audioStreamIndex, bool isSong)
{
// since .Contains is used on pixel format, we need it to be not null
_pixelFormat ??= string.Empty;
var complexFilter = new StringBuilder();
var videoLabel = $"{videoInput}:{(isSong ? "v" : videoStreamIndex.ToString())}";
string videoLabel = $"{videoInput}:{(isSong ? "v" : videoStreamIndex.ToString())}";
string audioLabel = audioStreamIndex.Match(index => $"{audioInput}:{index}", () => "0:a");
HardwareAccelerationKind acceleration = _hardwareAccelerationKind.IfNone(HardwareAccelerationKind.None);