mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-04-23 21:47:14 -04:00
allow to extract music bitrate info from formatInfo
This commit is contained in:
parent
bb16174936
commit
92118c2129
1 changed files with 5 additions and 1 deletions
|
@ -778,7 +778,11 @@ namespace MediaBrowser.MediaEncoding.Probing
|
|||
}
|
||||
}
|
||||
|
||||
if (bitrate == 0 && formatInfo != null && !string.IsNullOrEmpty(formatInfo.BitRate) && stream.Type == MediaStreamType.Video)
|
||||
// The bitrate info of FLAC musics and some videos is included in formatInfo.
|
||||
if (bitrate == 0
|
||||
&& formatInfo != null
|
||||
&& !string.IsNullOrEmpty(formatInfo.BitRate)
|
||||
&& (stream.Type == MediaStreamType.Video || 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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue