appsink new-sample
killerrats
koreysjunkmail at gmail.com
Thu Dec 7 23:34:02 UTC 2017
when I added the gst_buffer_unref it keeps it down a little but sample unref
will fail. saying:
GStreamer-CRITICAL **: gst_mini_object_unref: assertion
'mini_object->refcount > 0' failed
sometimes it will unref sometimes it won't unref. any ideas?
GstFlowReturn appsink_ToFile (GstElement* object,gpointer data)
{
GstFlowReturn flow = GST_FLOW_OK;
GstSample* _app_sample;
g_signal_emit_by_name(object,"pull-sample",&_app_sample);
if(_app_sample != NULL)
{
GstMapInfo _app_map;
GstBuffer* _app_buffer;
_app_buffer = gst_sample_get_buffer(_app_sample);
if(gst_buffer_map (_app_buffer, &_app_map, GST_MAP_READ))
{
/// code
}
if(_app_map.size > 0)
{
gst_buffer_unmap (_app_buffer, &_app_map);
}
if (gst_buffer_get_size(_app_buffer) > 0)
{
gst_buffer_unref(_app_buffer);
}
if(_app_sample != NULL)
{
gst_sample_unref(_app_sample);
}
}
else
{
pipe->AddToConsoleOutputList("no sample");
}
return flow;
}
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list