summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-08-08 23:53:11 +0200
committerwm4 <wm4@nowhere>2014-08-09 00:08:04 +0200
commit26d69758f67b631a266474a51123cf58be48af35 (patch)
treeb287ede1345219fe7df21b5f9dc6735290b59c5b /player
parente0fb2a4f2de346d45e1c5ebc2c065335ce3f865e (diff)
downloadmpv-26d69758f67b631a266474a51123cf58be48af35.tar.bz2
mpv-26d69758f67b631a266474a51123cf58be48af35.tar.xz
command: run OSD display code even if a property is unavailable
Trying to jump chapters in a gile that has no chapters does nothing, not even show a warning. This is confusing. The reason is that the "add chapter" command will just bail out completely if the property is unavailable. This was because it exited when it couldn't get the property type. Instead of exiting, just don't enter the code that needs the type. (I'm not sure when this behavior changed. I consider it a regression. It was probably caused by changes to the chapter code, which perhaps started returning UNAVAILABLE instead of OK if there are no chapters.)
Diffstat (limited to 'player')
-rw-r--r--player/command.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/player/command.c b/player/command.c
index 9c73f076b9..270798d925 100644
--- a/player/command.c
+++ b/player/command.c
@@ -3023,13 +3023,9 @@ static const struct property_osd_display {
static void show_property_osd(MPContext *mpctx, const char *pname, int osd_mode)
{
struct MPOpts *opts = mpctx->opts;
- struct m_option prop = {0};
const struct property_osd_display *p;
const char *name = pname;
- if (mp_property_do(pname, M_PROPERTY_GET_TYPE, &prop, mpctx) <= 0)
- return;
-
int osd_progbar = 0;
const char *osd_name = NULL;
const char *msg = NULL;
@@ -3074,6 +3070,8 @@ static void show_property_osd(MPContext *mpctx, const char *pname, int osd_mode)
if (!msg && osd_name)
msg = talloc_asprintf(tmp, "%s: ${%s}", osd_name, name);
+ struct m_option prop = {0};
+ mp_property_do(pname, M_PROPERTY_GET_TYPE, &prop, mpctx);
if (osd_progbar && (prop.flags & CONF_RANGE) == CONF_RANGE) {
bool ok = false;
if (prop.type == CONF_TYPE_INT) {