Improved capture stop() to fix issues

Merged Sylvain Berfini requested to merge fix/capture_stop_process into master

Merge request reports