summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-09-21 16:00:03 +0200
committerwm4 <wm4@nowhere>2014-09-21 16:00:03 +0200
commit60ca2d8f4d93f7a8535a00cf36f1fd57a06d0088 (patch)
treedda1289116a89598e26aa0f4c33846f6ae2d96fd /player
parenta0cee0339434bb4bb5ad1dcad7bcbf682c78165b (diff)
downloadmpv-60ca2d8f4d93f7a8535a00cf36f1fd57a06d0088.tar.bz2
mpv-60ca2d8f4d93f7a8535a00cf36f1fd57a06d0088.tar.xz
command: remove unneeded ifdefs
Why bother? Also, since now some properties could be mapped to non-existing options, but mp_property_generic_option() is used, deal with this case and return a not-found error code.
Diffstat (limited to 'player')
-rw-r--r--player/command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c
index d6ac3adc25..0c0b28d5f4 100644
--- a/player/command.c
+++ b/player/command.c
@@ -140,6 +140,10 @@ static int mp_property_generic_option(void *ctx, struct m_property *prop,
const char *optname = prop->name;
struct m_config_option *opt = m_config_get_co(mpctx->mconfig,
bstr0(optname));
+
+ if (!opt)
+ return M_PROPERTY_UNKNOWN;
+
void *valptr = opt->data;
switch (action) {
@@ -2837,11 +2841,9 @@ static const struct m_property mp_properties[] = {
{"sub-visibility", property_osd_helper},
{"sub-forced-only", property_osd_helper},
{"sub-scale", property_osd_helper},
-#if HAVE_LIBASS
{"ass-use-margins", property_osd_helper},
{"ass-vsfilter-aspect-compat", property_osd_helper},
{"ass-style-override", property_osd_helper},
-#endif
{"vf", mp_property_vf},
{"af", mp_property_af},
@@ -3062,12 +3064,10 @@ static const struct property_osd_display {
{ "ass-style-override", "ASS subtitle style override"},
{ "vf", "Video filters", .msg = "Video filters:\n${vf}"},
{ "af", "Audio filters", .msg = "Audio filters:\n${af}"},
-#if HAVE_TV
{ "tv-brightness", "Brightness", .osd_progbar = OSD_BRIGHTNESS },
{ "tv-hue", "Hue", .osd_progbar = OSD_HUE},
{ "tv-saturation", "Saturation", .osd_progbar = OSD_SATURATION },
{ "tv-contrast", "Contrast", .osd_progbar = OSD_CONTRAST },
-#endif
{0}
};