Skip to content

Commit

Permalink
Fix building on non-windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jp9000 committed May 18, 2022
1 parent dce17e5 commit bc4f451
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions plugins/obs-ffmpeg/obs-ffmpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,17 @@ bool obs_module_load(void)
obs_register_encoder(&hevc_nvenc_encoder_info);
#endif
}

#ifdef _WIN32
amf_load();
obs_register_encoder(&ffmpeg_amf_avc_encoder_info);
#endif

register_encoder_if_available(&ffmpeg_amf_avc_encoder_info, "h264_amf");
#if ENABLE_HEVC
obs_register_encoder(&ffmpeg_amf_hevc_encoder_info);
register_encoder_if_available(&ffmpeg_amf_hevc_encoder_info,
"hevc_amf");
#endif

#if !defined(_WIN32) && defined(LIBAVUTIL_VAAPI_AVAILABLE)
if (vaapi_supported()) {
blog(LOG_INFO, "FFMPEG VAAPI supported");
Expand All @@ -376,12 +382,12 @@ bool obs_module_load(void)

void obs_module_unload(void)
{
amf_unload();
#if ENABLE_FFMPEG_LOGGING
obs_ffmpeg_unload_logging();
#endif

#ifdef _WIN32
amf_unload();
jim_nvenc_unload();
#endif
}

0 comments on commit bc4f451

Please sign in to comment.