title: GStreamer-CRITICAL **: gst_mini_object_unref: assertion `GST_IS_MINI_OBJECT (mini_object)' failed
body: <p>I have a vector of <a href="http://www.openframeworks.cc/documentation/types/ofPtr.html" rel="nofollow">ofPtr</a> (shared pointer) items that point to objects containing videos, in form of <a href="http://www.openframeworks.cc/documentation/video/ofVideoPlayer.html" rel="nofollow">ofVideoPlayer</a> objects. When the videos are done playing ('dead' variable set to true) i delete them and their reference by calling <code>erase()</code> on the vector. </p>
  
  <pre><code>vector&lt;ofPtr&lt;videoElement&gt; &gt;::iterator iter = videos.begin();
  while (iter != videos.end()) {
      (**iter).update();
      if ((**iter).dead) {
          iter = videos.erase(iter);
      } else {
          ++iter;
      }
  }
  </code></pre>
  
  <p>The program runs fine (or seems to), yet every time the erase function is called, i get this output:</p>
  
  <blockquote>
    <p>GStreamer-CRITICAL **: gst_mini_object_unref: assertion
    `GST_IS_MINI_OBJECT (mini_object)' failed</p>
  </blockquote>
  
  <p>I don't seem to get these output lines when i clear the whole vector at once with <code>videos.clear()</code>, which confuses me over if this is a gstreamer or pointer issue.</p>
  
  <p>Also, I've tried with different video files and different codecs (H264, animation, photoJPEG) yet all show the same output line. </p>
  
  <p>As the output line hasn't led to any actual problems yet, i am not too concerned, but i would like to understand where this is coming from.</p>
  
  <p>System:
  Linux, Ubuntu 12.04, Openframeworks with codeblocks (of_v0.8.0_linux64_release)</p>