فهرست منبع

obs-x264: Ignore certain custom opts

These options should not be set via encoder settings, and may result in
unpredictable behavior.
jp9000 11 سال پیش
والد
کامیت
19b82af4ce
1فایلهای تغییر یافته به همراه10 افزوده شده و 2 حذف شده
  1. 10 2
      plugins/obs-x264/obs-x264.c

+ 10 - 2
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);
 	}