[spotify] Flush audio buffer on playback stop - and since we are

flushing from another thread we use evbuffer_enable_locking() which
in turn adds a requirement for libevent_pthreads to be present
This commit is contained in:
ejurgensen
2017-01-30 22:50:02 +01:00
parent 3ba2fb741b
commit bbb3322ddc
3 changed files with 16 additions and 2 deletions

View File

@@ -46,6 +46,7 @@
#include <getopt.h>
#include <event2/event.h>
#include <event2/thread.h>
#include <libavutil/log.h>
#include <libavformat/avformat.h>
#include <libavfilter/avfilter.h>
@@ -683,7 +684,11 @@ main(int argc, char **argv)
}
/* Initialize event base (after forking) */
evbase_main = event_base_new();
CHECK_NULL(L_MAIN, evbase_main = event_base_new());
#ifdef SPOTIFY
CHECK_ERR(L_MAIN, evthread_use_pthreads());
#endif
DPRINTF(E_LOG, L_MAIN, "mDNS init\n");
ret = mdns_init();