From 94ec8d87b8479fa94dec579b2c04f3dfe3eba176 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 27 Dec 2015 01:05:37 -0500 Subject: [PATCH] update bit depth probe --- .../Probing/InternalMediaInfoResult.cs | 6 ++++++ .../Probing/ProbeResultNormalizer.cs | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs index 3e4bfe1a70..f32dd178f2 100644 --- a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs +++ b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs @@ -144,6 +144,12 @@ namespace MediaBrowser.MediaEncoding.Probing /// The bits_per_sample. public int bits_per_sample { get; set; } + /// + /// Gets or sets the bits_per_raw_sample. + /// + /// The bits_per_raw_sample. + public int bits_per_raw_sample { get; set; } + /// /// Gets or sets the r_frame_rate. /// diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index befff72d19..b52446ac64 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -164,6 +164,10 @@ namespace MediaBrowser.MediaEncoding.Probing { stream.BitDepth = streamInfo.bits_per_sample; } + else if (streamInfo.bits_per_raw_sample > 0) + { + stream.BitDepth = streamInfo.bits_per_raw_sample; + } } else if (string.Equals(streamInfo.codec_type, "subtitle", StringComparison.OrdinalIgnoreCase)) { @@ -186,6 +190,10 @@ namespace MediaBrowser.MediaEncoding.Probing { stream.BitDepth = streamInfo.bits_per_sample; } + else if (streamInfo.bits_per_raw_sample > 0) + { + stream.BitDepth = streamInfo.bits_per_raw_sample; + } //stream.IsAnamorphic = string.Equals(streamInfo.sample_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase) || // string.Equals(stream.AspectRatio, "2.35:1", StringComparison.OrdinalIgnoreCase) ||