mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Allow direct play even if no audio stream is available
This commit is contained in:
parent
88d5230bab
commit
8753b7200f
@ -436,9 +436,9 @@ namespace MediaBrowser.Model.Dlna
|
|||||||
{
|
{
|
||||||
containerSupported = true;
|
containerSupported = true;
|
||||||
|
|
||||||
videoSupported = videoStream != null && profile.SupportsVideoCodec(videoStream.Codec);
|
videoSupported = videoStream == null || profile.SupportsVideoCodec(videoStream.Codec);
|
||||||
|
|
||||||
audioSupported = audioStream != null && profile.SupportsAudioCodec(audioStream.Codec);
|
audioSupported = audioStream == null || profile.SupportsAudioCodec(audioStream.Codec);
|
||||||
|
|
||||||
if (videoSupported && audioSupported)
|
if (videoSupported && audioSupported)
|
||||||
{
|
{
|
||||||
@ -447,18 +447,17 @@ namespace MediaBrowser.Model.Dlna
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var list = new List<TranscodeReason>();
|
|
||||||
if (!containerSupported)
|
if (!containerSupported)
|
||||||
{
|
{
|
||||||
reasons |= TranscodeReason.ContainerNotSupported;
|
reasons |= TranscodeReason.ContainerNotSupported;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (videoStream != null && !videoSupported)
|
if (!videoSupported)
|
||||||
{
|
{
|
||||||
reasons |= TranscodeReason.VideoCodecNotSupported;
|
reasons |= TranscodeReason.VideoCodecNotSupported;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (audioStream != null && !audioSupported)
|
if (!audioSupported)
|
||||||
{
|
{
|
||||||
reasons |= TranscodeReason.AudioCodecNotSupported;
|
reasons |= TranscodeReason.AudioCodecNotSupported;
|
||||||
}
|
}
|
||||||
@ -1182,14 +1181,18 @@ namespace MediaBrowser.Model.Dlna
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check audio codec
|
// Check audio codec
|
||||||
var selectedAudioStream = candidateAudioStreams.FirstOrDefault(audioStream => directPlayProfile.SupportsAudioCodec(audioStream.Codec));
|
MediaStream selectedAudioStream = null;
|
||||||
if (selectedAudioStream == null)
|
if (candidateAudioStreams.Any())
|
||||||
{
|
{
|
||||||
directPlayProfileReasons |= TranscodeReason.AudioCodecNotSupported;
|
selectedAudioStream = candidateAudioStreams.FirstOrDefault(audioStream => directPlayProfile.SupportsAudioCodec(audioStream.Codec));
|
||||||
}
|
if (selectedAudioStream == null)
|
||||||
else
|
{
|
||||||
{
|
directPlayProfileReasons |= TranscodeReason.AudioCodecNotSupported;
|
||||||
audioCodecProfileReasons = audioStreamMatches.GetValueOrDefault(selectedAudioStream);
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
audioCodecProfileReasons = audioStreamMatches.GetValueOrDefault(selectedAudioStream);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var failureReasons = directPlayProfileReasons | containerProfileReasons | subtitleProfileReasons;
|
var failureReasons = directPlayProfileReasons | containerProfileReasons | subtitleProfileReasons;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user