diff --git a/src/libavcodec/lavc_common.c b/src/libavcodec/lavc_common.c index aaa068124..00ffececd 100644 --- a/src/libavcodec/lavc_common.c +++ b/src/libavcodec/lavc_common.c @@ -190,15 +190,20 @@ static void av_log_ug_callback(void *avcl, int av_level, const char *fmt, va_lis buf[0] = '\0'; } +#ifdef HAVE_CONFIG_H // built inside UG ADD_TO_PARAM("lavcd-log-level", "* lavcd-log-level=[U][D]\n" " Set libavcodec log level (FFmpeg range semantics, unless 'U' suffix, then UltraGrid)\n" " - 'D' - use FFmpeg default log handler\n"); +#endif /// Sets specified log level either given explicitly or from UG-wide log_level void ug_set_av_logging() { av_log_set_level(uv_to_av_log(log_level)); av_log_set_callback(av_log_ug_callback); - const char *param = get_commandline_param("lavcd-log-level"); + const char *param = NULL; +#ifdef HAVE_CONFIG_H // built inside UG + param = get_commandline_param("lavcd-log-level"); +#endif if (param == NULL) { return; } diff --git a/src/utils/thread.c b/src/utils/thread.c index 68026fd68..d874384f6 100644 --- a/src/utils/thread.c +++ b/src/utils/thread.c @@ -37,14 +37,14 @@ #ifdef HAVE_CONFIG_H #include "config.h" -#include "config_unix.h" -#include "config_win32.h" #endif #include #ifdef HAVE_SETTHREADDESCRIPTION #include #endif +#include +#include #include "debug.h" #include "host.h" diff --git a/src/utils/worker.cpp b/src/utils/worker.cpp index 5aceaa5fc..d26c4fc34 100644 --- a/src/utils/worker.cpp +++ b/src/utils/worker.cpp @@ -35,17 +35,13 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H -#include "config.h" -#include "config_unix.h" -#include "config_win32.h" -#endif // HAVE_CONFIG_H - #include "utils/misc.h" // get_cpu_core_count #include "utils/thread.h" #include "utils/worker.h" +#include #include +#include #include #include #include