From c349e2f337693c53687b0bd5e4d8669363e2d79d Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 6 May 2018 21:23:28 +0200 Subject: command: make sub-add and audio-add commands async Pretty trivial, since commands can be async now, and the common code even provides convenience like running commands on a worker thread. The only ugly thing is that mp_add_external_file() needs an extra flag for locking. This is because there's still some code which calls this synchronously from the main thread, and unlocking the core makes no sense there. --- player/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player/core.h') diff --git a/player/core.h b/player/core.h index 0840a7836d..5ca227a8fa 100644 --- a/player/core.h +++ b/player/core.h @@ -488,7 +488,7 @@ struct playlist_entry *mp_check_playlist_resume(struct MPContext *mpctx, void mp_abort_playback_async(struct MPContext *mpctx); void uninit_player(struct MPContext *mpctx, unsigned int mask); int mp_add_external_file(struct MPContext *mpctx, char *filename, - enum stream_type filter); + enum stream_type filter, bool unlock); #define FLAG_MARK_SELECTION 1 void mp_switch_track(struct MPContext *mpctx, enum stream_type type, struct track *track, int flags); -- cgit v1.2.3