diff options
author | John Stebbins <[email protected]> | 2020-07-13 08:28:55 -0600 |
---|---|---|
committer | John Stebbins <[email protected]> | 2020-07-13 08:31:26 -0600 |
commit | 64c04a126491e984e010ff097b89bcc275782172 (patch) | |
tree | 552ab8b0ce9de69f084c62b114187ce695c38dcf /gtk | |
parent | d23a3556ad5563071ea181864cb6e52f0f1d3d9b (diff) |
LinGui: fix fastdecode tune error with x265
If fastdecode was set while encoder was x264, the value would be used
when the codec was changed to x265.
Fixes https://github.com/HandBrake/HandBrake/issues/3005
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/presets.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/gtk/src/presets.c b/gtk/src/presets.c index b9edb60bb..dd0a5b96f 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -1768,14 +1768,18 @@ ghb_settings_to_preset(GhbValue *settings) g_string_append_printf(str, "%s", tune); sep = ","; } - if (ghb_dict_get_bool(preset, "x264FastDecode")) + int encoder = ghb_get_video_encoder(settings); + if (encoder & HB_VCODEC_X264_MASK) { - g_string_append_printf(str, "%s%s", sep, "fastdecode"); - sep = ","; - } - if (ghb_dict_get_bool(preset, "x264ZeroLatency")) - { - g_string_append_printf(str, "%s%s", sep, "zerolatency"); + if (ghb_dict_get_bool(preset, "x264FastDecode")) + { + g_string_append_printf(str, "%s%s", sep, "fastdecode"); + sep = ","; + } + if (ghb_dict_get_bool(preset, "x264ZeroLatency")) + { + g_string_append_printf(str, "%s%s", sep, "zerolatency"); + } } char *tunes; tunes = g_string_free(str, FALSE); |