mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-26 16:45:09 +00:00
Backport pull request #17883 from jellyfin/release-12.z
Fix trickplay using the wrong video stream
Original-merge: 31f0533191
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
1 parent
006ecadbe0
commit
51abf6f503
1 file changed
+9
@@ -922,6 +922,15 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
inputArg = "-hwaccel_flags +low_priority " + inputArg;
|
||||
}
|
||||
|
||||
// Force the video stream, otherwise ffmpeg may pick a cover image.
|
||||
var streamIndex = EncodingHelper.FindIndex(mediaSource.MediaStreams, imageStream);
|
||||
if (streamIndex < 0)
|
||||
{
|
||||
throw new InvalidOperationException($"Unable to locate requested stream {imageStream.Title}");
|
||||
}
|
||||
|
||||
inputArg += " -map 0:" + streamIndex;
|
||||
|
||||
var filterParam = encodingHelper.GetVideoProcessingFilterParam(jobState, options, vidEncoder).Trim();
|
||||
if (string.IsNullOrWhiteSpace(filterParam))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user