obs-x264: Allow opencl through much longer alias

Due to the fact that people follow terrible guides that ignorantly
recommend opencl, the "opencl" custom x264 option was blocked.  However,
because some people still apparently want to use it, it's being renamed
to "opencl_is_experimental_and_potentially_unstable" so that anyone who
uses this option realizes that they should probably think twice about
using the option rather than just follow some terrible guide that tells
them to use it.
master
jp9000 2017-01-16 13:22:04 -08:00
parent b1707b18b2
commit bf9048a1a4
1 changed files with 4 additions and 0 deletions

View File

@ -288,6 +288,8 @@ static inline void override_base_params(struct obs_x264 *obsx264, char **params,
preset, profile, tune);
}
#define OPENCL_ALIAS "opencl_is_experimental_and_potentially_unstable"
static inline void set_param(struct obs_x264 *obsx264, const char *param)
{
char *name;
@ -302,6 +304,8 @@ static inline void set_param(struct obs_x264 *obsx264, const char *param)
strcmp(name, "width") != 0 &&
strcmp(name, "height") != 0 &&
strcmp(name, "opencl") != 0) {
if (strcmp(name, OPENCL_ALIAS) == 0)
strcpy(name, "opencl");
if (x264_param_parse(&obsx264->params, name, val) != 0)
warn("x264 param: %s failed", param);
}