Gstreamer 如何将GstBuffer列表传递给下游自定义元素

Gstreamer 如何将GstBuffer列表传递给下游自定义元素,gstreamer,gstreamer-1.0,Gstreamer,Gstreamer 1.0,下面是我的Gst缓冲区配置,我正在创建一个缓冲区列表,并尝试使用Gst\u pad\u push\u list(pad,buf\u list)API调用将其传递给下游元素 gst_roi_transform_frame_ip (GstVideoFilter * filter, GstVideoFrame * frame){ static GstStaticPadTemplate pad_temp = GST_STATIC_PAD_TEMPLATE ("src", GST_P

下面是我的Gst缓冲区配置,我正在创建一个缓冲区列表,并尝试使用Gst\u pad\u push\u list(pad,buf\u list)API调用将其传递给下游元素

gst_roi_transform_frame_ip (GstVideoFilter * filter, GstVideoFrame * frame){

static GstStaticPadTemplate pad_temp = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, gst_caps_from_string (VIDEO_SRC_CAPS ",width = (int) [1, 420], height = (int) [1, 420]")); // adding the source pad

static  GstPad * pad = gst_pad_new_from_static_template (&pad_temp,NULL);
gst_pad_set_active (pad, TRUE);
Mat img = frame // reading the frame.
    buf = gst_buffer_new_wrapped(sub_img.data,(sub_img.total()* sub_img.elemSize())); 
    //convert Mat to Gstbuffer
    gst_buffer_list_add (buf_list, buf); adding it to the buf. list.

    gst_pad_push_list(pad, buf_list); // pushing it to the downstream element.
    return GST_FLOW_OK;
}
由于此函数调用,执行管道时出错。gst\u pad\u push\u list()

**"double free or corruption (out) "**
还有一个疑问:

如何在下游自定义元素中捕获此推送列表

对这种环境非常陌生。如果有人能给我一些参考代码,这将是非常非常有用的

先谢谢你