mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
update stream specifiers
This commit is contained in:
parent
9da48106c8
commit
b8f57f586b
1 changed files with 18 additions and 8 deletions
|
@ -2692,17 +2692,27 @@ namespace MediaBrowser.Api.Playback
|
||||||
//inputModifier += " -noaccurate_seek";
|
//inputModifier += " -noaccurate_seek";
|
||||||
}
|
}
|
||||||
|
|
||||||
var videoStream = state.VideoStream;
|
foreach (var stream in state.MediaSource.MediaStreams)
|
||||||
if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec))
|
|
||||||
{
|
{
|
||||||
inputModifier += " -codec:0 " + videoStream.Codec;
|
if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1)
|
||||||
|
{
|
||||||
|
inputModifier += " -codec:" + stream.Index.ToString(UsCulture) + " " + stream.Codec;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//var videoStream = state.VideoStream;
|
||||||
|
//if (videoStream != null && !string.IsNullOrWhiteSpace(videoStream.Codec))
|
||||||
|
//{
|
||||||
|
// inputModifier += " -codec:0 " + videoStream.Codec;
|
||||||
|
|
||||||
var audioStream = state.AudioStream;
|
// var audioStream = state.AudioStream;
|
||||||
if (audioStream != null && !string.IsNullOrWhiteSpace(audioStream.Codec))
|
// if (audioStream != null && !string.IsNullOrWhiteSpace(audioStream.Codec))
|
||||||
{
|
// {
|
||||||
inputModifier += " -codec:1 " + audioStream.Codec;
|
// inputModifier += " -codec:1 " + audioStream.Codec;
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
return inputModifier;
|
return inputModifier;
|
||||||
|
|
Loading…
Reference in a new issue