diff options
author | Bradley Sepos <[email protected]> | 2016-06-03 20:08:22 -0400 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2016-06-03 20:19:06 -0400 |
commit | 9d2f3f5f2f97dd8fe0edd78979ab83a99b026c75 (patch) | |
tree | bca5088954e56463c0ac03b6ac35a11564615d2c /test/test.c | |
parent | 6c6524adf93e530d8be5b53e23e678de34a66606 (diff) |
cli: Take preset frame rate / mode into account.
Diffstat (limited to 'test/test.c')
-rw-r--r-- | test/test.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/test/test.c b/test/test.c index 4133d2144..069eb6265 100644 --- a/test/test.c +++ b/test/test.c @@ -3514,15 +3514,25 @@ static hb_dict_t * PreparePreset(const char *preset_name) hb_dict_set(preset, "VideoTurboTwoPass", hb_value_bool(1)); } } + const char *vrate_preset; + const char *cfr_preset; + vrate_preset = hb_value_get_string(hb_dict_get(preset, "VideoFramerate")); + cfr_preset = hb_value_get_string(hb_dict_get(preset, "VideoFramerateMode")); if (vrate != NULL) { hb_dict_set(preset, "VideoFramerate", hb_value_string(vrate)); - hb_dict_set(preset, "VideoFramerateMode", hb_value_string("pfr")); + if (cfr_preset == NULL || strcmp(cfr_preset, "") == 0) + { + hb_dict_set(preset, "VideoFramerateMode", hb_value_string("pfr")); + } } - else + else if (vrate_preset == NULL || strcmp(vrate_preset, "") == 0) { hb_dict_set(preset, "VideoFramerate", hb_value_string("auto")); - hb_dict_set(preset, "VideoFramerateMode", hb_value_string("vfr")); + if (cfr_preset == NULL || strcmp(cfr_preset, "") == 0) + { + hb_dict_set(preset, "VideoFramerateMode", hb_value_string("vfr")); + } } if (cfr != -1) { |