]> granicus.if.org Git - handbrake/commitdiff
WinGui: Another fix to AutoPassthru functionality so that built-in presets still...
authorsr55 <sr55.hb@outlook.com>
Sat, 21 Jan 2012 14:14:29 +0000 (14:14 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 21 Jan 2012 14:14:29 +0000 (14:14 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4416 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/Controls/AudioPanel.cs

index fe7fab39fd60f17995ae9b3508f6b425ded9b958..7ce9c318b756e38eedd02f2e6cfbfa9641be1cc5 100644 (file)
@@ -321,7 +321,7 @@ namespace Handbrake.Controls
                         // Correct bad passthru option\r
                         if (this.IsIncompatiblePassthru(track))\r
                         {\r
-                            AudioEncoder encoder = GetCompatiblePassthru(track);\r
+                            AudioEncoder encoder = GetCompatiblePassthru(track, false);\r
                             drp_audioEncoder.SelectedItem = EnumHelper<AudioEncoder>.GetDisplay(encoder);\r
                         } \r
                     }\r
@@ -350,7 +350,7 @@ namespace Handbrake.Controls
                     // Correct bad passthru option\r
                     if (this.IsIncompatiblePassthru(track))\r
                     {\r
-                        AudioEncoder encoder = GetCompatiblePassthru(track);\r
+                        AudioEncoder encoder = GetCompatiblePassthru(track, false);\r
                         drp_audioEncoder.SelectedItem = EnumHelper<AudioEncoder>.GetDisplay(encoder);\r
                     }\r
                     break;\r
@@ -844,6 +844,12 @@ namespace Handbrake.Controls
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Move to\r
+        /// </summary>\r
+        /// <param name="top">\r
+        /// The top.\r
+        /// </param>\r
         private void MoveTo(bool top)\r
         {\r
             if (audioList.SelectedRows.Count == 0) return;\r
@@ -1081,13 +1087,15 @@ namespace Handbrake.Controls
         /// <param name="track">\r
         /// The track.\r
         /// </param>\r
+        /// <param name="useAutoPassthruOptions">\r
+        /// The use Auto Passthru Options.\r
+        /// </param>\r
         /// <returns>\r
         /// AN Audio encoder.\r
         /// </returns>\r
-        private AudioEncoder GetCompatiblePassthru(AudioTrack track)\r
+        private AudioEncoder GetCompatiblePassthru(AudioTrack track, bool useAutoPassthruOptions)\r
         {\r
-            //\r
-            if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedAudioPassthruOpts))\r
+            if (useAutoPassthruOptions)\r
             {\r
                 if (track.ScannedTrack.Format.Contains("AC3") && this.check_ac3.Checked)\r
                 {\r
@@ -1155,7 +1163,7 @@ namespace Handbrake.Controls
             {\r
                 if (this.IsIncompatiblePassthru(track))\r
                 {\r
-                    track.Encoder = GetCompatiblePassthru(track);\r
+                    track.Encoder = GetCompatiblePassthru(track, true);\r
                 }\r
             }\r
         }\r