From 2251867890d52b1dc1c78d7e986a9c563ab09be8 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Wed, 8 Nov 2006 23:40:40 +0000 Subject: [PATCH] Minor fixes for building on Linux. (Why does wxThread::GetCPUCount like failing?) Originally committed to SVN as r549. --- configure.ac | 3 ++- core/audio_display.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 51abfdd1e..e9e07ee90 100644 --- a/configure.ac +++ b/configure.ac @@ -3,6 +3,7 @@ AC_INIT(aegisub, 1.10) AC_CONFIG_AUX_DIR(ac) AM_INIT_AUTOMAKE AC_CONFIG_HEADER([core/posix/acconf.h]) +AC_GNU_SOURCE AC_CANONICAL_HOST @@ -88,7 +89,7 @@ AC_SEARCH_LIBS([lua_call], [lua lua50],, [AC_MSG_ERROR([lua not found.])]) AC_SEARCH_LIBS([luaopen_base], [lualib lualib50],, [AC_MSG_WARN([lualib not found, assuming lua 5.1])]) AC_CHECK_LIB([portaudio], [Pa_Initialize],, [AC_MSG_ERROR([portaudio not found.])]) AC_CHECK_LIB([avcodec], [avcodec_init]) -AC_CHECK_LIB([avformat], [av_frac_init]) +AC_CHECK_LIB([avformat], [av_read_frame]) PKG_CHECK_MODULES([ASA], asa >= 0.3.2, [ CPPFLAGS="$CPPFLAGS $ASA_CFLAGS" diff --git a/core/audio_display.cpp b/core/audio_display.cpp index c7775ee85..115851613 100644 --- a/core/audio_display.cpp +++ b/core/audio_display.cpp @@ -713,6 +713,7 @@ void AudioDisplay::DrawSpectrum(wxDC &finaldc,bool weak) { ////// START OF PARALLELISED CODE ////// const int cpu_count = wxThread::GetCPUCount(); + if (cpu_count < 1) cpu_count = 1; std::vector threads(cpu_count); for (int i = 0; i < cpu_count; i++) { // Ugh, way too many data to copy in