]> granicus.if.org Git - handbrake/commitdiff
WinGui: Workaround a bug in libhb where if the audio track name == "", the engine...
authorsr55 <sr55.hb@outlook.com>
Sat, 7 Jan 2017 20:24:07 +0000 (20:24 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 7 Jan 2017 20:24:23 +0000 (20:24 +0000)
win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs

index 31f315f7e4e1146a5cc6f067b2f6d14e23ecb0d6..a53996b0f20aabe91227df21641cffbfb36e1204 100644 (file)
@@ -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)