title: gstreamer using GstVideoOverlay crashes the program
body: <p>I am currently trying to make a video appear inside a GLFWwindow. But whenever i try to use my pre-defined GstVideoOverlay inside my <code>bus_sync_handler</code> function, it crashes my program. Here's the code that crashes:</p>
  <pre><code>GstBusSyncReply gVideo::bus_sync_handler(GstBus * bus, GstMessage * message, Data *data) {
  
      g_print(&quot;overlay 1\n&quot;);
  
      if(!data-&gt;overlay) {
          g_print(&quot;NULL&quot;);
      }
      .
      .
  </code></pre>
  <p>The program just crashes in here. Data is my pre-defined struct which goes as:</p>
  <pre><code>struct VideoData {
      GstElement *convert;
      GstElement *sink;
      GstCaps *caps;
  };
  
  struct AudioData {
      GstElement *convert;
      GstElement *resample;
      GstElement *sink;
  };
  
  struct Data {
      AudioData a_data;
      VideoData v_data;
      GstElement *pipeline;
      GstElement *source;
      GstVideoOverlay *overlay;
  } data;
  </code></pre>
  <p>And here's where i send my data to my vbus handler:</p>
  <pre><code>bus = gst_element_get_bus (data.pipeline);
  
  logi(&quot;bus 1&quot;);
  
  gst_bus_set_sync_handler(bus, (GstBusSyncHandler)bus_sync_handler, NULL, NULL);
  
  logi(&quot;bus 2&quot;);
  </code></pre>
  <p>And here's the list of errors I am getting:</p>
  <pre><code>...
  #10   Object &quot;&quot;, at 0x6dc52acb, in gst_memory_new_wrapped
  #9    Object &quot;&quot;, at 0x6dc76770, in gst_element_get_type
  #8    Object &quot;&quot;, at 0x6dc621e9, in gst_bus_post
  #7    Object &quot;&quot;, at 0x6dc50528, in gst_memory_new_wrapped
  #6    Object &quot;&quot;, at 0x6dca56f1, in gst_param_spec_array
  #5    Object &quot;&quot;, at 0x6dc52e1f, in gst_memory_new_wrapped
  #4    Object &quot;&quot;, at 0x6dc79dd7, in gst_element_post_message
  #3    Object &quot;&quot;, at 0x6dc52acb, in gst_memory_new_wrapped
  #2    Object &quot;&quot;, at 0x6dc76770, in gst_element_get_type
  #1    Object &quot;&quot;, at 0x6dc621e9, in gst_bus_post
  #0    Object &quot;&quot;, at 0x6192b566, in ZN6gVideo16bus_sync_handlerEP7_GstBusP11_GstMessagePNS_4DataE
  </code></pre>
  <p>And they just keep going on. I just don't get why the GstVideoOverlay is crashing my program. Do I have to initialize it with a certain value? If so, I am initializing it with NULL inside my constructor, but nothing changes. Any help or idea is appreciated.</p>