diff options
author | James Gerity <snoopjedi@gmail.com> | 2022-06-13 00:45:51 -0400 |
---|---|---|
committer | jaseg <136313+jaseg@users.noreply.github.com> | 2022-06-17 00:10:01 +0200 |
commit | 4a8554319f2457328330236dbce6c41a5f6c978f (patch) | |
tree | 1b48e246f08e52893aef7c7a68c0a544c0c62813 /mpv.py | |
parent | 1d2a0bef46918009840effe1e6caa865e0c76487 (diff) | |
download | python-mpv-4a8554319f2457328330236dbce6c41a5f6c978f.tar.gz python-mpv-4a8554319f2457328330236dbce6c41a5f6c978f.tar.bz2 python-mpv-4a8554319f2457328330236dbce6c41a5f6c978f.zip |
Error for known-incompatible libmpv (closes #223)
Diffstat (limited to 'mpv.py')
-rw-r--r-- | mpv.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 |