diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-01-26 15:40:15 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-26 15:40:15 -0500 |
| commit | 1cd5e208713a057680b915c9136e0d4493611ed3 (patch) | |
| tree | 59e258ecd246dfb253c06cade5f0092af9874774 /MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs | |
| parent | 0d0e4ad695f3657d7ca3eef1ed54fe8608a490a1 (diff) | |
| parent | 9ebf9162ab68fbf61a1dd5e7801eb9abe985762c (diff) | |
Merge pull request #2425 from MediaBrowser/beta
Beta
Diffstat (limited to 'MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index c16d3afbd..2f8ecaece 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -47,6 +47,8 @@ namespace MediaBrowser.MediaEncoding.Probing info.MediaStreams = internalStreams.Select(s => GetMediaStream(isAudio, s, data.format)) .Where(i => i != null) + // Drop subtitle streams if we don't know the codec because it will just cause failures if we don't know how to handle them + .Where(i => i.Type != MediaStreamType.Subtitle || !string.IsNullOrWhiteSpace(i.Codec)) .ToList(); if (data.format != null) @@ -185,11 +187,7 @@ namespace MediaBrowser.MediaEncoding.Probing // If ffprobe reported the container bitrate as being the same as the video stream bitrate, then it's wrong if (videoStreamsBitrate == (info.Bitrate ?? 0)) { - var streamBitrates = info.MediaStreams.Where(i => !i.IsExternal).Select(i => i.BitRate ?? 0).Sum(); - if (streamBitrates > (info.Bitrate ?? 0)) - { - info.Bitrate = streamBitrates; - } + info.InferTotalBitrate(true); } } |
