Merge pull request #4626 from nyanmisaka/audio-bitrate

Do not extract audio stream bitrate info for videos from formatInfo
This commit is contained in:
Bill Thornton 2020-12-01 13:39:29 -05:00 committed by GitHub
commit 1bb4b590a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -782,7 +782,7 @@ namespace MediaBrowser.MediaEncoding.Probing
if (bitrate == 0
&& formatInfo != null
&& !string.IsNullOrEmpty(formatInfo.BitRate)
&& (stream.Type == MediaStreamType.Video || stream.Type == MediaStreamType.Audio))
&& (stream.Type == MediaStreamType.Video || (isAudio && stream.Type == MediaStreamType.Audio)))
{
// If the stream info doesn't have a bitrate get the value from the media format info
if (int.TryParse(formatInfo.BitRate, NumberStyles.Any, _usCulture, out var value))