From 7f7da739dc4485771416931aab652b6651737d69 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 17 Jan 2015 22:04:33 +0000 Subject: WinGui: Don't set audio rate fields in the json message for passthru. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6764 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Json/Factories/EncodeFactory.cs | 23 ++++++++++++---------- .../Model/Encoding/AudioEncoding.cs | 5 +++++ 2 files changed, 18 insertions(+), 10 deletions(-) (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop') diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs index 6d10b64eb..51b29533f 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Json/Factories/EncodeFactory.cs @@ -307,19 +307,22 @@ namespace HandBrake.Interop.Json.Factories Name = item.Name, }; - if (item.EncodeRateType == AudioEncodeRateType.Quality) + if (!item.IsPassthru) { - audioTrack.Quality = item.Quality; - } + if (item.EncodeRateType == AudioEncodeRateType.Quality) + { + audioTrack.Quality = item.Quality; + } - if (item.EncodeRateType == AudioEncodeRateType.Compression) - { - audioTrack.CompressionLevel = item.Compression; - } + if (item.EncodeRateType == AudioEncodeRateType.Compression) + { + audioTrack.CompressionLevel = item.Compression; + } - if (item.EncodeRateType == AudioEncodeRateType.Bitrate) - { - audioTrack.Bitrate = item.Bitrate; + if (item.EncodeRateType == AudioEncodeRateType.Bitrate) + { + audioTrack.Bitrate = item.Bitrate; + } } audio.AudioList.Add(audioTrack); diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs index 5d76a9f5d..2f08623c1 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Model/Encoding/AudioEncoding.cs @@ -80,5 +80,10 @@ namespace HandBrake.Interop.Model.Encoding /// Gets or sets Name. /// public string Name { get; set; } + + /// + /// Gets or sets a value indicating whether is passthru. + /// + public bool IsPassthru { get; set; } } } -- cgit v1.2.3