Skip to content

Improved handling of external (player) processes.

Manuel Laggner requested to merge hampelratte:devel into devel

Created by: hampelratte

Improved handling of external processes.

The stdout and stderr streams of external child processes were not read before. As a result, the child process might block up, if it generates a lot of output, because the internal buffers for stdout and stderr fill up. For example, if you use MPV on Linux to play the video files, MPV locks up quite fast (at around 1 min after launching it on my system). This change replaces all direct calls to Runtime.getDefault().exec(...) with a call to the new method exec(...). In this method, Runtime.getDefault().exec(...) is called and additionally two threads are created, which read the stdout and stderr of the spawned process and discard the contents directly.

Merge request reports