title: Displaying a video using OpenCV 2.4.1
body: <p>Hi i tried to display a video using webcam using following basic commands
  in opencv 2.4.1 :-</p>
  
  <pre><code>int main()
  
  { cv::Mat san;
  
    cv::VideoCapture san_cap(0);
  
    while(1)
    {
      san_cap.read(san);
  
      cv::imshow("gp",san);
  
      if(cv::waitKey(0) &gt;=0)
  
        break;
    }
  
     return 1;
  
    }
  </code></pre>
  
  <p>during compilation i dont get any error but while running my solution my output video stucked on a fixed frame and in my console i was having following error :-</p>
  
  <p><strong>VIDIOC_QUERYMENU: Invalid argument</strong></p>
  
  <p>on line by line debbuging my code i found out i m getting error in this particular line</p>
  
  <pre><code>if(cv::waitKey(0) &gt;= 0)
  </code></pre>
  
  <p>what can be the error in this line???</p>