diff options
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);
}
|