summaryrefslogtreecommitdiffstats
path: root/m_property.h
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-01 22:45:46 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:18:37 +0200
commitfe8a695f83271cec1b98cf0b426d7194d2a19545 (patch)
tree1828588a47f26f75c66668f81dbc10f2d5280d49 /m_property.h
parent3a1f89810fedf98b66e1fae8b0c3f5862417730a (diff)
downloadmpv-fe8a695f83271cec1b98cf0b426d7194d2a19545.tar.bz2
mpv-fe8a695f83271cec1b98cf0b426d7194d2a19545.tar.xz
command.c: use different field in property table for integer data
The video equalizer properties plus tv_* and teletext_* ones use a single function to handle multiple properties, with data in the struct m_option "prop" argument indicating which property is being handled. They all use integer data for that, but stored it in the "priv" field of the struct which has type "void *". This caused warnings and is not standard C (it's not guaranteed that you can cast an arbitrary integer to "void *' and back - it'd work in the _other_ direction with intptr_t if that type exists). Change the code to store the data in the "offset" field of the prop struct instead. The name is not optimal for the way the functions use it (except for gamma), but it'll do. (An alternative would be to store a pointer in the priv field as in "(void *)&(const int){123}", but that's somewhat ugly - the explicit (void *) cast is needed to avoid a qualifier warning unless make it non-const data).
Diffstat (limited to 'm_property.h')
0 files changed, 0 insertions, 0 deletions