libv4l2: error turning on stream: Invalid argument VIDIOC_STREAMON: Invalid argument
I'm working on logitech external camera using opencv 3.0.0 and C++ on cross compiled raspberry pi 2 board,
When I run a program using the camera and stop it with Ctrl + C, I can't get it run for a second time and it gives me the following:
libv4l2: error turning on stream: Invalid argument VIDIOC_STREAMON: Invalid argument Cannot read a frame from video stream
I have tried lsusb and the webcam is recognized.
The only solution is to unplug & plug the webcam usb on raspberry pi 2 board.
Any suggestion will be appreciated :) thanks