diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/loadfile.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/player/loadfile.c b/player/loadfile.c index bd48bb4b0e..7a0afe4c52 100644 --- a/player/loadfile.c +++ b/player/loadfile.c @@ -871,6 +871,19 @@ static int process_open_hooks(struct MPContext *mpctx) return 0; } +static int process_preloaded_hooks(struct MPContext *mpctx) +{ + mp_hook_run(mpctx, NULL, "on_preloaded"); + + while (!mp_hook_test_completion(mpctx, "on_preloaded")) { + mp_idle(mpctx); + if (mpctx->stop_play) + return -1; + } + + return 0; +} + static void process_unload_hooks(struct MPContext *mpctx) { mp_hook_run(mpctx, NULL, "on_unload"); @@ -1256,6 +1269,9 @@ reopen_file: check_previous_track_selection(mpctx); + if (process_preloaded_hooks(mpctx)) + goto terminate_playback; + if (!init_complex_filters(mpctx)) goto terminate_playback; |