mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-24 20:00:20 +00:00
command: make the "run" command work on Windows too
Do so by using mp_subprocess(). Although this uses completely different code on Unix too, you shouldn't notice a difference. A less ncie thing is that this reserves an entire thread while the command is running (which wastes some memory for stack, at least). But this is probably still the simplest way, and the fork() trick is apparently not implementable with posix_subprocess().
This commit is contained in:
@@ -185,10 +185,11 @@ static void flush_status_line(struct mp_log_root *root)
|
||||
root->blank_lines = 0;
|
||||
}
|
||||
|
||||
void mp_msg_flush_status_line(struct mpv_global *global)
|
||||
void mp_msg_flush_status_line(struct mp_log *log)
|
||||
{
|
||||
pthread_mutex_lock(&mp_msg_lock);
|
||||
flush_status_line(global->log->root);
|
||||
if (log->root)
|
||||
flush_status_line(log->root);
|
||||
pthread_mutex_unlock(&mp_msg_lock);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user