1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-19 21:31:52 +00:00

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.
This commit is contained in:
wm4 2013-10-02 20:43:13 +02:00
parent a8240c1b58
commit a4998e08ef

View File

@ -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);
}