Use ctypes.util.find_library to find libmpv. Thanks to @mozbugbox

This commit is contained in:
jaseg 2016-07-01 13:12:02 +02:00
parent f3cab6cdf1
commit 8d8b061fcc
1 changed files with 3 additions and 2 deletions

5
mpv.py
View File

@ -1,5 +1,6 @@
from ctypes import *
import ctypes.util
import threading
import os
import asyncio
@ -10,9 +11,9 @@ from functools import partial
if os.name == 'nt':
backend = CDLL('mpv-1.dll')
backend = CDLL(ctypes.util.find_library('mpv-1.dll'))
else:
backend = CDLL('libmpv.so')
backend = CDLL(ctypes.util.find_library('mpv'))
class MpvHandle(c_void_p):