Fix wrong ffmpeg map argument due to wrong calculation

This commit is contained in:
Jonas Resch 2021-12-08 10:17:25 +01:00
parent 01a0a4a87c
commit d47811bdaf

View File

@ -2007,7 +2007,7 @@ namespace MediaBrowser.Controller.MediaEncoding
if (state.AudioStream.IsExternal)
{
int externalAudioMapIndex = state.SubtitleStream != null && state.SubtitleStream.IsExternal ? 2 : 1;
int externalAudioStream = state.MediaSource.MediaStreams.FindIndex(i => i.Path == state.AudioStream.Path);
int externalAudioStream = state.MediaSource.MediaStreams.Where(i => i.Path == state.AudioStream.Path).ToList().IndexOf(state.AudioStream);
args += string.Format(
CultureInfo.InvariantCulture,