浏览代码

obs-ffmpeg: Fix compilation when ENABLE_HEVC is not set

When ENABLE_HEVC is not set the 'bool hevc' function parameter
is not being used in this function causing a warning and aborting
compilation.
Florian Zwoch 2 年之前
父节点
当前提交
eb80be5bf9
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c

+ 6 - 0
plugins/obs-ffmpeg/obs-ffmpeg-vaapi.c

@@ -287,6 +287,8 @@ static bool vaapi_update(void *data, obs_data_t *settings, bool hevc)
 
 		hevc_vaapi_video_info(enc, &info);
 	} else
+#else
+	UNUSED_PARAMETER(hevc);
 #endif
 	{
 		h264_vaapi_video_info(enc, &info);
@@ -564,6 +566,8 @@ static bool vaapi_encode_internal(void *data, struct encoder_frame *frame,
 					&enc->header_size, &enc->sei,
 					&enc->sei_size);
 			} else
+#else
+			UNUSED_PARAMETER(hevc);
 #endif
 			{
 				obs_extract_avc_headers(
@@ -649,6 +653,8 @@ static void vaapi_defaults_internal(obs_data_t *settings, bool hevc)
 					 FF_PROFILE_HEVC_MAIN);
 
 	} else
+#else
+	UNUSED_PARAMETER(hevc);
 #endif
 	{
 		obs_data_set_default_int(settings, "profile",