summaryrefslogtreecommitdiffstats
path: root/libvo/vo_x11.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-02 18:51:38 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:41:03 +0300
commitdbe080ec9f05cd216f4217c81409a37d3f4db969 (patch)
tree48861e98ea8a195781e314b7b96923509c35b0f1 /libvo/vo_x11.c
parent530df550e4af63fce126001c5509d931d9ee65f9 (diff)
downloadmpv-dbe080ec9f05cd216f4217c81409a37d3f4db969.tar.bz2
mpv-dbe080ec9f05cd216f4217c81409a37d3f4db969.tar.xz
Change VOCTRL_[GET|SET]_EQUALIZER argument passing
These were the only voctrl types with more than one argument. The second argument was passed using variable arguments. Change them to use a single argument (address of a struct containing both old arguments). This makes forwarding the arguments to other functions easier and allows simplifying code.
Diffstat (limited to 'libvo/vo_x11.c')
-rw-r--r--libvo/vo_x11.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index ca79dab24f..2b56ee48b6 100644
--- a/libvo/vo_x11.c
+++ b/libvo/vo_x11.c
@@ -764,25 +764,13 @@ static int control(uint32_t request, void *data, ...)
return get_image(data);
case VOCTRL_SET_EQUALIZER:
{
- va_list ap;
- int value;
-
- va_start(ap, data);
- value = va_arg(ap, int);
-
- va_end(ap);
- return vo_x11_set_equalizer(data, value);
+ struct voctrl_set_equalizer_args *args = data;
+ return vo_x11_set_equalizer(args->name, args->value);
}
case VOCTRL_GET_EQUALIZER:
{
- va_list ap;
- int *value;
-
- va_start(ap, data);
- value = va_arg(ap, int *);
-
- va_end(ap);
- return vo_x11_get_equalizer(data, value);
+ struct voctrl_get_equalizer_args *args = data;
+ return vo_x11_get_equalizer(args->name, args->valueptr);
}
case VOCTRL_ONTOP:
vo_x11_ontop();