title: OpenCV: reading frames from webcam hangs
body: <p>I've been experiencing an issue with OpenCV lately which I wasn't able to google a solution for. Now I solved it and want to share the solution.<br>
  So I use OpenCV to work with a webcam in Linux. I built and installed OpenCV 2.4.2 and run my program. It opened the camera (the LED on it turned on) but it never got to read any frame from it. It freezes on the line</p>
  
  <pre><code>capture.grab();
  </code></pre>
  
  <p>It just never returns from that method. Also applies to the <code>&gt;&gt;</code> operator which uses grab() internally.<br>
  This happens only if I set desired frame width/height to some non-default values.<br>
  I found some people with a similar problem but their solutions didn't help me.</p>