title: C# -Application hang after connected with IP Camera
body: <p>I am developing an application to show video using webcam and IpCamera.
  For <code>IpCamera</code>, it shows video stream for sometime but after that it stops streaming and application hangs.</p>
  
  <p>I am using <a href="http://www.emgu.com/wiki/index.php?title=Camera_Capture" rel="nofollow">Emgu.CV Library</a> to grab frames and show it in the picture control.</p>
  
  <p>I have tried below code for display of video by using function <code>QueryFrame()</code>. </p>
  
  <p>for connecting Ip camera
  <code>Capture capture = new Capture(URL);</code></p>
  
  <p>for grabbing frames
  <code>Image&lt;Bgr, Byte&gt; ImageFrame = capture.QueryFrame();</code></p>
  
  <p>After some time the <code>QueryFrame()</code> provide <code>null</code> value and application hangs.</p>
  
  <p>Can any one tell me why this is happening and how I can handle it?</p>
  
  <p>Thank you in advance.</p>