Merge pull request #7333 from eyezak/hls/audio-bitstream-fmp4

This commit is contained in:
Joshua M. Boniface 2022-03-25 10:13:58 -04:00 committed by GitHub
commit c229f3ae0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -969,6 +969,7 @@ namespace MediaBrowser.Controller.MediaEncoding
// Apply aac_adtstoasc bitstream filter when media source is in mpegts.
if (string.Equals(segmentFormat, "mp4", StringComparison.OrdinalIgnoreCase)
&& (string.Equals(mediaSourceContainer, "mpegts", StringComparison.OrdinalIgnoreCase)
|| string.Equals(mediaSourceContainer, "aac", StringComparison.OrdinalIgnoreCase)
|| string.Equals(mediaSourceContainer, "hls", StringComparison.OrdinalIgnoreCase)))
{
bitStreamArgs = GetBitStreamArgs(state.AudioStream);
@ -1696,7 +1697,8 @@ namespace MediaBrowser.Controller.MediaEncoding
// Source and target codecs must match
if (string.IsNullOrEmpty(videoStream.Codec)
|| !state.SupportedVideoCodecs.Contains(videoStream.Codec, StringComparison.OrdinalIgnoreCase))
|| (state.SupportedVideoCodecs.Length != 0
&& !state.SupportedVideoCodecs.Contains(videoStream.Codec, StringComparison.OrdinalIgnoreCase)))
{
return false;
}