Skip to content

Conversation

@na-na-hi
Copy link
Contributor

813c112 moved force window to option callback. This happens before the loading of the file has finished (which is supposed to trigger handle_force_window) so it is too early to handle certain cases, such as loading of album art failed and therefore window will never be created because there is no video track.

Adding force window check in playloop to make sure window is always initialized after file loading is complete.

Fixes: 813c112
Fixes: #17209

813c112 moved force window to option
callback. This happens before the loading of the file has finished
(which is supposed to trigger handle_force_window) so it is too early to
handle certain cases, such as loading of album art failed and therefore
window will never be created because there is no video track.

Adding force window check in playloop to make sure window is always
initialized after file loading is complete.

Fixes: 813c112
@guidocella
Copy link
Contributor

Can we call it only in load_external_opts_thread (with force)? It does fix that bug.

Also funny how in this situation mpv plays in the terminal but OSD messages and scripts don't get printed because it presumably tries to output to a window.

@na-na-hi
Copy link
Contributor Author

Can we call it only in load_external_opts_thread (with force)? It does fix that bug.

It only handles external files which is not enough for correct operation of handle_force_window:

mpv/player/playloop.c

Lines 1026 to 1028 in f57c5ca

// True if we're either in idle mode, or loading of the file has finished.
// It's also set via force in some stages during file loading.
bool act = mpctx->stop_play || mpctx->playback_initialized || force;

Correct solution must make sure mpctx->playback_initialized is checked again after its value is changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants