summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-30 13:30:56 +0200
committerwm4 <wm4@nowhere>2014-05-30 13:30:56 +0200
commit3053a68d2dffe79106e9515f5978de3e184f2594 (patch)
tree481643f98eb4abb0d8e4eea41675611d89da61aa
parent8ba346a5541294cb17b0e0e53306dd96c985eab4 (diff)
downloadmpv-3053a68d2dffe79106e9515f5978de3e184f2594.tar.bz2
mpv-3053a68d2dffe79106e9515f5978de3e184f2594.tar.xz
tv: remove sysinfo() usage
This call was used limited the buffer size if installed RAM was below 16 MB. This stopped being useful a decade ago. The check could also overflow on 32 bit systems. Just get rid of it.
-rwxr-xr-xold-configure3
-rw-r--r--stream/tvi_v4l2.c10
-rw-r--r--wscript5
3 files changed, 0 insertions, 18 deletions
diff --git a/old-configure b/old-configure
index b160881871..6a8d9533aa 100755
--- a/old-configure
+++ b/old-configure
@@ -545,9 +545,6 @@ check_statement_libs "shm" $_shm SHM "sys/types.h sys/ipc.h sys/shm.h" \
check_trivial "audio select()" $_select AUDIO_SELECT
-check_statement_libs "sys/sysinfo.h" auto SYS_SYSINFO_H \
- sys/sysinfo.h 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)'
-
echocheck "pkg-config"
if $($_pkg_config --version > /dev/null 2>&1); then
if test "$_ld_static"; then
diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c
index 3ffd775afd..4aafbed557 100644
--- a/stream/tvi_v4l2.c
+++ b/stream/tvi_v4l2.c
@@ -46,9 +46,6 @@ known issues:
#include <sys/types.h>
#include <unistd.h>
#include <math.h>
-#if HAVE_SYS_SYSINFO_H
-#include <sys/sysinfo.h>
-#endif
#if HAVE_SYS_VIDEOIO_H
#include <sys/videoio.h>
#else
@@ -1230,13 +1227,6 @@ static int get_capture_buffer_size(priv_t *priv)
if (priv->tv_param->buffer_size >= 0) {
bufsize = priv->tv_param->buffer_size*1024*1024;
} else {
-#if HAVE_SYS_SYSINFO_H
- struct sysinfo si;
-
- sysinfo(&si);
- bufsize = (si.freeram/2)*si.mem_unit;
- if ( bufsize < 16*1024*1024)
-#endif
bufsize = 16*1024*1024;
}
diff --git a/wscript b/wscript
index faa45aa26e..36f3206e18 100644
--- a/wscript
+++ b/wscript
@@ -209,11 +209,6 @@ iconv support use --disable-iconv.",
'func': check_statement('sys/vfs.h',
'struct statfs fs; fstatfs(0, &fs); fs.f_namelen')
}, {
- 'name': 'sys-sysinfo-h',
- 'desc': 'sys/sysinfo.h',
- 'func': check_statement('sys/sysinfo.h',
- 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo(&s_info)')
- }, {
'name': '--libguess',
'desc': 'libguess support',
'func': check_pkg_config('libguess', '>= 1.0'),