diff options
author | sr55 <[email protected]> | 2017-01-07 20:24:07 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2017-01-07 20:24:07 +0000 |
commit | 0c34c5f8a2a368b894f3f671c582557ea45dc62d (patch) | |
tree | a54b84129a254798430abe2fe29d5aae1cd0956b /win | |
parent | 12ba2764808c738cce98fea70b605aabc3459820 (diff) |
WinGui: Workaround a bug in libhb where if the audio track name == "", the engine crashes when initially writing the mp4 file.
Diffstat (limited to 'win')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs index 31f315f7e..a53996b0f 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs @@ -14,6 +14,7 @@ namespace HandBrakeWPF.Services.Encode.Factories using System.Globalization; using System.Linq; using System.Runtime.InteropServices; + using System.Runtime.InteropServices.ComTypes; using HandBrake.ApplicationServices.Interop; using HandBrake.ApplicationServices.Interop.HbLib; @@ -360,7 +361,7 @@ namespace HandBrakeWPF.Services.Encode.Factories Mixdown = mixdown != null ? mixdown.Id : -1, NormalizeMixLevel = false, Samplerate = sampleRate != null ? sampleRate.Rate : 0, - Name = item.TrackName, + Name = !string.IsNullOrEmpty(item.TrackName) ? item.TrackName : null, }; if (!item.IsPassthru) |