aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-12-27 01:05:37 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-12-27 01:05:37 -0500
commitd59e4ff3577c95c372173cd68005abcc2baf217e (patch)
treecad8ffa4956475f931a6ade65585bc364c0fdf1b
parentc68a03b3abecc20977e948a749d3d6d37836aa21 (diff)
update bit depth probe
-rw-r--r--MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs6
-rw-r--r--MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs8
2 files changed, 14 insertions, 0 deletions
diff --git a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs
index 3e4bfe1a7..f32dd178f 100644
--- a/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs
+++ b/MediaBrowser.MediaEncoding/Probing/InternalMediaInfoResult.cs
@@ -145,6 +145,12 @@ namespace MediaBrowser.MediaEncoding.Probing
public int bits_per_sample { get; set; }
/// <summary>
+ /// Gets or sets the bits_per_raw_sample.
+ /// </summary>
+ /// <value>The bits_per_raw_sample.</value>
+ public int bits_per_raw_sample { get; set; }
+
+ /// <summary>
/// Gets or sets the r_frame_rate.
/// </summary>
/// <value>The r_frame_rate.</value>
diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs
index 7c3293b89..791dc0cf1 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) ||