Remove this hack and make the thread sleep instead, as per libvlc docs:
@note If no data is immediately available, then the callback should sleep. @warning The application is responsible for avoiding deadlock situations. In particular, the callback should return an error if playback is stopped; if it does not return, then L{libvlc_media_player_stop}() will never return.
Remove this hack and make the thread sleep instead, as per libvlc docs: