From 19b82af4ceebd0ca86a10e8a0dde4918b29e3065 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 25 Aug 2014 08:27:06 -0700 Subject: [PATCH] obs-x264: Ignore certain custom opts These options should not be set via encoder settings, and may result in unpredictable behavior. --- plugins/obs-x264/obs-x264.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/obs-x264/obs-x264.c b/plugins/obs-x264/obs-x264.c index af6aca369..6c01f2748 100644 --- a/plugins/obs-x264/obs-x264.c +++ b/plugins/obs-x264/obs-x264.c @@ -232,8 +232,16 @@ static inline void set_param(struct obs_x264 *obsx264, const char *param) const char *val; if (getparam(param, &name, &val)) { - if (x264_param_parse(&obsx264->params, name, val) != 0) - warn("x264 param: %s failed", param); + if (strcmp(name, "preset") != 0 && + strcmp(name, "profile") != 0 && + strcmp(name, "tune") != 0 && + strcmp(name, "fps") != 0 && + strcmp(name, "force-cfr") != 0 && + strcmp(name, "width") != 0 && + strcmp(name, "height") != 0) { + if (x264_param_parse(&obsx264->params, name, val) != 0) + warn("x264 param: %s failed", param); + } bfree(name); }