]> granicus.if.org Git - handbrake/commitdiff
MacGui: don't show fast decode checkbox when the encoder is not x264, fixes #2083.
authorDamiano Galassi <damiog@gmail.com>
Fri, 7 Jun 2019 10:31:36 +0000 (12:31 +0200)
committerDamiano Galassi <damiog@gmail.com>
Fri, 7 Jun 2019 10:31:36 +0000 (12:31 +0200)
macosx/HBVideo+UIAdditions.m
macosx/HBVideo.m

index bc38c60811979a77b9fe211849650862d061c109..1b2aef339d3421e5bed2595c6ec66d73cdc0c7c4 100644 (file)
 
 - (BOOL)fastDecodeSupported
 {
+    if (self.encoder != HB_VCODEC_X264)
+    {
+        return NO;
+    }
+
     const char * const *tunes = hb_video_encoder_get_tunes(self.encoder);
 
     for (int i = 0; tunes != NULL && tunes[i] != NULL; i++)
index 21e701bbf860d741c52595a6af56bd4fc30a9c97..997c88bf75d327e773b8b278fb08699e93bb1a1f 100644 (file)
@@ -332,6 +332,11 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
     if (levels.count && ![levels containsObject:self.level]) {
         self.level = levels.firstObject;
     }
+
+    if (self.encoder != HB_VCODEC_X264)
+    {
+        self.fastDecode = NO;
+    }
 }
 
 - (void)validateVideoOptionExtra:(int)previousEncoder
@@ -390,7 +395,7 @@ NSString * const HBVideoChangedNotification = @"HBVideoChangedNotification";
     for (int i = 0; tunes != NULL && tunes[i] != NULL; i++)
     {
         // we filter out "fastdecode" as we have a dedicated checkbox for it
-        if (strcasecmp(tunes[i], "fastdecode") != 0)
+        if (self.encoder != HB_VCODEC_X264 || strcasecmp(tunes[i], "fastdecode") != 0)
         {
             [temp addObject:@(tunes[i])];
         }