From: ritsuka <damiog@gmail.com>
Date: Thu, 21 Aug 2014 17:43:05 +0000 (+0000)
Subject: MacGui: load the lavcOption from preset and fixed the encoder selection when the... 
X-Git-Tag: 0.10.0~195
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ee1f90e18726df817b94c04fda55ea823aae4e0;p=handbrake

MacGui: load the lavcOption from preset and fixed the encoder selection when the container is changed.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6336 b64f7644-9d1e-0410-96f1-a4d463321fa5
---

diff --git a/macosx/HBVideoController.m b/macosx/HBVideoController.m
index 9a6cb4b73..af2c6c0db 100644
--- a/macosx/HBVideoController.m
+++ b/macosx/HBVideoController.m
@@ -260,6 +260,13 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
         self.codec = hb_video_encoder_get_default(videoContainer);
         [self videoEncoderPopUpChanged:nil];
     }
+    else
+    {
+        self.codec = selectedVidEncoderTag;
+    }
+
+    [fVidEncoderPopUp selectItemWithTag:self.codec];
+
 }
 
 - (void)titleChanged:(NSNotification *)aNotification
@@ -439,6 +446,9 @@ NSString *HBVideoEncoderChangedNotification = @"HBVideoEncoderChangedNotificatio
         }
     }
 
+    // Apply the lavcOption
+    self.lavcOptions = preset[@"lavcOption"];
+
     int qualityType = [preset[@"VideoQualityType"] intValue] - 1;
     /* Note since the removal of Target Size encoding, the possible values for VideoQuality type are 0 - 1.
      * Therefore any preset that uses the old 2 for Constant Quality would now use 1 since there is one less index