diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-08 01:05:30 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-08 01:05:30 +0200 |
commit | 231b33a02fae95b260120349040106bfa34a3750 (patch) | |
tree | 23c4de0e6263b2d99966348d7003177b3b3e3740 /libao2 | |
parent | 52126e574c7872ca95e7974cfe5445421b74f24c (diff) | |
parent | 92cd6dc3e916ae4275ff05d2b238fc778cfbfc6b (diff) | |
download | mpv-231b33a02fae95b260120349040106bfa34a3750.tar.bz2 mpv-231b33a02fae95b260120349040106bfa34a3750.tar.xz |
Merge svn changes up to r30165
Diffstat (limited to 'libao2')
-rw-r--r-- | libao2/ao_alsa.c | 9 | ||||
-rw-r--r-- | libao2/ao_dart.c | 2 |
2 files changed, 5 insertions, 6 deletions
diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index 4c92597765..140b13a62a 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -271,10 +271,9 @@ static void print_help (void) "[AO_ALSA] Sets device (change , to . and : to =)\n"); } -static int str_maxlen(strarg_t *str) { - if (str->len > ALSA_DEVICE_SIZE) - return 0; - return 1; +static int str_maxlen(void *strp) { + strarg_t *str = strp; + return str->len <= ALSA_DEVICE_SIZE; } static int try_open_device(const char *device, int open_mode, int try_ac3) @@ -336,7 +335,7 @@ static int init(int rate_hz, int channels, int format, int flags) snd_pcm_uframes_t boundary; const opt_t subopts[] = { {"block", OPT_ARG_BOOL, &block, NULL}, - {"device", OPT_ARG_STR, &device, (opt_test_f)str_maxlen}, + {"device", OPT_ARG_STR, &device, str_maxlen}, {NULL} }; diff --git a/libao2/ao_dart.c b/libao2/ao_dart.c index 58ee4d1886..e1df7d32f7 100644 --- a/libao2/ao_dart.c +++ b/libao2/ao_dart.c @@ -148,7 +148,7 @@ static int init(int rate, int channels, int format, int flags) const opt_t subopts[] = { {"share", OPT_ARG_BOOL, &fShare, NULL}, - {"bufsize", OPT_ARG_INT, &nDartSamples, (opt_test_f)int_non_neg}, + {"bufsize", OPT_ARG_INT, &nDartSamples, int_non_neg}, {NULL} }; |