From b8ade7c99b830ee9870040bcfc1f2c3d3a64d172 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 16 Sep 2016 14:23:54 +0200 Subject: player, ao, vo: don't call mp_input_wakeup() directly Currently, calling mp_input_wakeup() will wake up the core thread (also called the playloop). This seems odd, but currently the core indeed calls mp_input_wait() when it has nothing more to do. It's done this way because MPlayer used input_ctx as central "mainloop". This is probably going to change. Remove direct calls to this function, and replace it with mp_wakeup_core() calls. ao and vo are changed to use opaque callbacks and not use input_ctx for this purpose. Other code already uses opaque callbacks, or has legitimate reasons to use input_ctx directly (such as sending actual user input). --- player/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/audio.c') diff --git a/player/audio.c b/player/audio.c index 1329057033..7bcd5c87bb 100644 --- a/player/audio.c +++ b/player/audio.c @@ -397,8 +397,8 @@ static void reinit_audio_filters_and_output(struct MPContext *mpctx) mp_audio_set_channels(&afs->output, &afs->output.channels); - mpctx->ao = ao_init_best(mpctx->global, ao_flags, mpctx->input, - mpctx->encode_lavc_ctx, afs->output.rate, + mpctx->ao = ao_init_best(mpctx->global, ao_flags, mp_wakeup_core_cb, + mpctx, mpctx->encode_lavc_ctx, afs->output.rate, afs->output.format, afs->output.channels); ao_c->ao = mpctx->ao; -- cgit v1.2.3