<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>Hi,</div><div>I have a plugin that generates custom application messages to be sent on the bus:</div><div><br></div><div>///////////</div><div>//INSIDE MY PLUGIN</div><div><br></div><div><div>&nbsp;&nbsp;GstMessage* msg;</div><div>&nbsp;&nbsp;GstStructure* structure;</div><div>&nbsp;&nbsp;GstBus* bus = gst_element_get_bus(GST_ELEMENT(filter));</div><div><br></div><div>&nbsp;&nbsp;MyInfo* myinfo = new MyInfo;</div><div>&nbsp;&nbsp;/* do stuff with myinfo, including allocating internal data */</div><div><br></div><div>&nbsp;&nbsp;structure = gst_structure_new("FILTERMESSAGE",</div><div>&nbsp;&nbsp; &nbsp;"info", G_TYPE_POINTER, (gpointer)myinfo,&nbsp;</div><div>&nbsp;&nbsp; &nbsp;NULL);&nbsp;</div><div>&nbsp;&nbsp;msg =
 gst_message_new_application(NULL,structure);</div><div>&nbsp;&nbsp;gst_bus_post (bus, msg);</div></div><div><br></div><div><br></div><div>On the other side, I have my application that watches the bus messages, and gets my info:</div><div><div>&nbsp;&nbsp; &nbsp;case GST_MESSAGE_APPLICATION:</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;const GstStructure *structure = gst_message_get_structure(message);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;MyInfo* info;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;info = (MyInfo*)g_value_get_pointer(gst_structure_get_value(structure, "info"));</div><div><br></div><div>All this works fine, but how can I free the resources allocated in myinfo structure? I can't release the strcuture that is owned by message, and I try to unref the message in the application then I get a&nbsp;</div><div>&nbsp;CRITICAL **: file ..\..\..\Source\gstreamer\gst\gstminiobject.c: line 359: assertion `mini_object-&gt;refcount &gt; 0'
 failed</div><div><br></div><div>So how can I release my data?</div><div>Regards,</div><div>Al</div><div><br></div></div><div style="position:fixed"></div>


</div><br>




      </body></html>