diff --git a/options/m_property.c b/options/m_property.c index 431e16a51a..d286f60ad8 100644 --- a/options/m_property.c +++ b/options/m_property.c @@ -159,7 +159,8 @@ int m_property_do(struct mp_log *log, const struct m_property *prop_list, return r; } case M_PROPERTY_GET_CONSTRICTED_TYPE: { - if ((r = do_action(prop_list, name, action, arg, ctx)) >= 0) + r = do_action(prop_list, name, action, arg, ctx); + if (r >= 0 || r == M_PROPERTY_UNAVAILABLE) return r; if ((r = do_action(prop_list, name, M_PROPERTY_GET_TYPE, arg, ctx)) >= 0) return r; diff --git a/player/command.c b/player/command.c index c4cf6543d8..393966bb77 100644 --- a/player/command.c +++ b/player/command.c @@ -1045,6 +1045,8 @@ static int mp_property_edition(void *ctx, struct m_property *prop, struct demuxer *demuxer = mpctx->demuxer; if (action == M_PROPERTY_GET_CONSTRICTED_TYPE && demuxer) { + if (demuxer->num_editions <= 1) + return M_PROPERTY_UNAVAILABLE; *(struct m_option *)arg = (struct m_option){ .type = CONF_TYPE_INT, .min = 0,