diff options
author | sr55 <[email protected]> | 2015-04-07 18:50:38 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2015-04-07 18:50:38 +0000 |
commit | 11d88373a0fadfa6321a3a85f28e00df88494d11 (patch) | |
tree | adbe054d653ade7bb050d7b0857cfea3f562d3d4 | |
parent | edf2d4db1116457e8f14f4021896b38366434e17 (diff) |
WinGui: Fix the copy mask list.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7069 b64f7644-9d1e-0410-96f1-a4d463321fa5
3 files changed, 14 insertions, 13 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Audio.cs b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Audio.cs index ce1c69c9c..2661a8f17 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Audio.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Json/Encode/Audio.cs @@ -24,7 +24,7 @@ namespace HandBrake.ApplicationServices.Interop.Json.Encode /// <summary>
/// Gets or sets the copy mask.
/// </summary>
- public string[] CopyMask { get; set; }
+ public uint[] CopyMask { get; set; }
/// <summary>
/// Gets or sets the fallback encoder.
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs index 52fc9636a..875cdc938 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/Encode/Factories/EncodeFactory.cs @@ -306,15 +306,15 @@ namespace HandBrake.ApplicationServices.Services.Encode.Factories {
Audio audio = new Audio();
- List<string> copyMaskList = new List<string>();
- if (job.AllowedPassthruOptions.AudioAllowAACPass) copyMaskList.Add("copy:aac");
- if (job.AllowedPassthruOptions.AudioAllowAC3Pass) copyMaskList.Add("copy:ac3");
- if (job.AllowedPassthruOptions.AudioAllowDTSHDPass) copyMaskList.Add("copy:dtshd");
- if (job.AllowedPassthruOptions.AudioAllowDTSPass) copyMaskList.Add("copy:dts");
- if (job.AllowedPassthruOptions.AudioAllowEAC3Pass) copyMaskList.Add("copy:eac3");
- if (job.AllowedPassthruOptions.AudioAllowFlacPass) copyMaskList.Add("copy:flac");
- if (job.AllowedPassthruOptions.AudioAllowMP3Pass) copyMaskList.Add("copy:mp3");
- if (job.AllowedPassthruOptions.AudioAllowTrueHDPass) copyMaskList.Add("copy:truehd");
+ List<uint> copyMaskList = new List<uint>();
+ if (job.AllowedPassthruOptions.AudioAllowAACPass) copyMaskList.Add(NativeConstants.HB_ACODEC_AAC_PASS);
+ if (job.AllowedPassthruOptions.AudioAllowAC3Pass) copyMaskList.Add(NativeConstants.HB_ACODEC_AC3_PASS);
+ if (job.AllowedPassthruOptions.AudioAllowDTSHDPass) copyMaskList.Add(NativeConstants.HB_ACODEC_DCA_HD_PASS);
+ if (job.AllowedPassthruOptions.AudioAllowDTSPass) copyMaskList.Add(NativeConstants.HB_ACODEC_DCA_PASS);
+ if (job.AllowedPassthruOptions.AudioAllowEAC3Pass) copyMaskList.Add(NativeConstants.HB_ACODEC_EAC3_PASS);
+ if (job.AllowedPassthruOptions.AudioAllowFlacPass) copyMaskList.Add(NativeConstants.HB_ACODEC_FLAC_PASS);
+ if (job.AllowedPassthruOptions.AudioAllowMP3Pass) copyMaskList.Add(NativeConstants.HB_ACODEC_MP3_PASS);
+ if (job.AllowedPassthruOptions.AudioAllowTrueHDPass) copyMaskList.Add(NativeConstants.HB_ACODEC_TRUEHD_PASS);
audio.CopyMask = copyMaskList.ToArray();
HBAudioEncoder audioEncoder = HandBrakeEncoderHelpers.GetAudioEncoder(EnumHelper<AudioEncoder>.GetShortName(job.AllowedPassthruOptions.AudioEncoderFallback));
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index c35d6d7de..4c9921459 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1520,9 +1520,10 @@ namespace HandBrakeWPF.ViewModels if (this.CurrentTask != null && !string.IsNullOrEmpty(this.CurrentTask.Destination))
{
- saveFileDialog.InitialDirectory = Directory.Exists(Path.GetDirectoryName(this.CurrentTask.Destination))
- ? Path.GetDirectoryName(this.CurrentTask.Destination) + "\\"
- : null;
+ if (Directory.Exists(Path.GetDirectoryName(this.CurrentTask.Destination)))
+ {
+ saveFileDialog.InitialDirectory = Path.GetDirectoryName(this.CurrentTask.Destination);
+ }
saveFileDialog.FileName = Path.GetFileName(this.CurrentTask.Destination);
}
|