From a4998e08effd7ddc536110580db5afb6aab5de7f Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 2 Oct 2013 20:43:13 +0200 Subject: command: don't let "avsync" property print NOPTS value Can happen when seeking in audio files with attached picture. MP_NOPTS_VALUE doesn't really make sense outside of mpv internals, so don't return it. --- mpvcore/command.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mpvcore/command.c b/mpvcore/command.c index a7dab8be8a..a18d5620a1 100644 --- a/mpvcore/command.c +++ b/mpvcore/command.c @@ -313,6 +313,8 @@ static int mp_property_avsync(m_option_t *prop, int action, void *arg, { if (!mpctx->sh_audio || !mpctx->sh_video) return M_PROPERTY_UNAVAILABLE; + if (mpctx->last_av_difference == MP_NOPTS_VALUE) + return M_PROPERTY_UNAVAILABLE; return m_property_double_ro(prop, action, arg, mpctx->last_av_difference); } -- cgit v1.2.3