From 2e266391559c2aa867c24593325f07effba97c64 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 5 Mar 2015 11:17:22 +0100 Subject: player, client API: refactor cplayer init, reduce client API differences Move the command line parsing and some other things to the common init routine shared between command line player and client API. This means they're using almost exactly the same code now. The main intended side effect is that the client API will load mpv.conf; though still only if config loading is enabled. (The cplayer still avoids creating an extra thread, passes a command line, and prints an exit status to the terminal. It also has some different defaults.) --- player/client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'player/client.c') diff --git a/player/client.c b/player/client.c index 1c24d5522e..3ed7ea620e 100644 --- a/player/client.c +++ b/player/client.c @@ -516,11 +516,9 @@ static void *playback_thread(void *p) int mpv_initialize(mpv_handle *ctx) { - if (mp_initialize(ctx->mpctx) < 0) + if (mp_initialize(ctx->mpctx, NULL) < 0) return MPV_ERROR_INVALID_PARAMETER; - mp_print_version(ctx->mpctx->log, false); - pthread_t thread; if (pthread_create(&thread, NULL, playback_thread, ctx->mpctx) != 0) return MPV_ERROR_NOMEM; -- cgit v1.2.3