<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> GstMessage* msg;</div><div> GstStructure* structure;</div><div> GstBus* bus = gst_element_get_bus(GST_ELEMENT(filter));</div><div><br></div><div> MyInfo* myinfo = new MyInfo;</div><div> /* do stuff with myinfo, including allocating internal data */</div><div><br></div><div> structure = gst_structure_new("FILTERMESSAGE",</div><div> "info", G_TYPE_POINTER, (gpointer)myinfo, </div><div> NULL); </div><div> msg =
gst_message_new_application(NULL,structure);</div><div> 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> case GST_MESSAGE_APPLICATION:</div><div> const GstStructure *structure = gst_message_get_structure(message);</div><div> MyInfo* info;</div><div> 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 </div><div> CRITICAL **: file ..\..\..\Source\gstreamer\gst\gstminiobject.c: line 359: assertion `mini_object->refcount > 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>