From 79596113ea87460c9280853ae595d16c77b7c4c0 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 6 May 2018 21:29:30 +0200 Subject: [PATCH] player: don't even start loading external tracks when aborting loading It seems the ytdl script like to continue loading external tracks even if loading was aborted. Trying to do so will still quickly fail, but not without a load of log noise. So check and error out early. --- player/loadfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/player/loadfile.c b/player/loadfile.c index 09d3bad3a1..e4017a2afa 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -582,7 +582,7 @@ int mp_add_external_file(struct MPContext *mpctx, char *filename, enum stream_type filter, bool unlock) { struct MPOpts *opts = mpctx->opts; - if (!filename) + if (!filename || mp_cancel_test(mpctx->playback_abort)) return -1; char *disp_filename = filename;