Skip to content

Stuck in threading on macOS #61

@kpj

Description

@kpj

Hello,

consider the following code:

import mpv

_url = 'test.webm'
mpv = mpv.MPV()
mpv.loadfile(_url)
print('waiting')
mpv.wait_for_playback()
print('done')

On Linux, this will print waiting, then play test.webm, and finally print done as expected.

On macOS 10.12.6 using Python 3.6 and MPV 0.27 however, it only prints waiting and is then stuck forever while the Python-Rocket starts jumping in my Dock.

I looked into python-mpv's code, and for mpv.wait_for_playback() it is stuck in line 557, which is:

self._playback_cond.wait()  # _playback_cond is threading.Condition

Using mpv.wait_for_property('filename', lambda x: x is None) instead, makes it stuck in line 569, which is:

sema.acquire()  # sema is threading.Semaphore

The problem thus seems to somehow be related to the handling of the threading library.
Do you have any suggestion what might be causing this?

This is also possibly a duplicate of #59.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions