Update capture.cpp