From c54c3b6991ac0273e6b7a42dc42c5103f87ff9f1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 18 Jan 2017 17:13:26 +0100 Subject: player: restructure cancel callback As preparation for file prefetching, we basically have to get rid of using mpctx->playback_abort for the main demuxer (i.e. the thing that can be prefetched). It can't be changed on a running demuxer, and always using the same cancel handle would either mean aborting playback would also abort prefetching, or that playback can't be aborted anymore. Make this more flexible with some refactoring. Thi is a quite shitty solution if you ask me, but YOLO. --- input/input.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'input/input.h') diff --git a/input/input.h b/input/input.h index 5b5edd580d..fb928e0808 100644 --- a/input/input.h +++ b/input/input.h @@ -242,8 +242,7 @@ void mp_input_wakeup(struct input_ctx *ictx); // Used to asynchronously abort playback. Needed because the core still can // block on network in some situations. -struct mp_cancel; -void mp_input_set_cancel(struct input_ctx *ictx, struct mp_cancel *cancel); +void mp_input_set_cancel(struct input_ctx *ictx, void (*cb)(void *c), void *c); // If this returns true, use Right Alt key as Alt Gr to produce special // characters. If false, count Right Alt as the modifier Alt key. -- cgit v1.2.3