Skip to content

Commit

Permalink
Error for known-incompatible libmpv (closes jaseg#223)
Browse files Browse the repository at this point in the history
  • Loading branch information
SnoopJ committed Jun 13, 2022
1 parent 1d2a0be commit ad6add2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mpv.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,11 @@ def _mpv_client_api_version():
ver = backend.mpv_client_api_version()
return ver>>16, ver&0xFFFF

MPV_VERSION = _mpv_client_api_version()
if MPV_VERSION < (1, 108):
ver = '.'.join(str(num) for num in MPV_VERSION)
raise RuntimeError(f"python-mpv requires libmpv with an API version of 1.108 or higher (libmpv >= 0.33), but you have an older version ({ver}).")

backend.mpv_free.argtypes = [c_void_p]
_mpv_free = backend.mpv_free

Expand Down

0 comments on commit ad6add2

Please sign in to comment.