diff options
author | wm4 <wm4@nowhere> | 2015-03-05 11:17:22 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-05 11:22:15 +0100 |
commit | 2e266391559c2aa867c24593325f07effba97c64 (patch) | |
tree | b92fa5c05190a538fd04b5a0ecc32168795847c5 /player/client.c | |
parent | dcabceb6268d64a16c370504de265d0dcc657301 (diff) | |
download | mpv-2e266391559c2aa867c24593325f07effba97c64.tar.bz2 mpv-2e266391559c2aa867c24593325f07effba97c64.tar.xz |
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.)
Diffstat (limited to 'player/client.c')
-rw-r--r-- | player/client.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; |