- (void)setEncoder:(int)encoder
{
+ int previousEncoder = _encoder;
+
if (encoder != _encoder)
{
[[self.undo prepareWithInvocationTarget:self] setEncoder:_encoder];
{
[self validatePresetsSettings];
[self validateAdvancedOptions];
+ [self validateVideoOptionExtra:previousEncoder];
}
[self postChangedNotification];
}
}
+- (void)validateVideoOptionExtra:(int)previousEncoder
+{
+ if (!((previousEncoder & HB_VCODEC_X264_MASK &&
+ self.encoder & HB_VCODEC_X264_MASK) ||
+ (previousEncoder & HB_VCODEC_X265_MASK &&
+ self.encoder & HB_VCODEC_X265_MASK)))
+ {
+ self.videoOptionExtra = @"";
+ }
+}
+
- (void)setNilValueForKey:(NSString *)key
{
[self setValue:@0 forKey:key];