"framerate", GST_TYPE_FRACTION, 1, 1,
NULL);
- if (caps)
- _mm_check_caps_format(caps);
- else
- gstcs_error("caps is NULL");
+ _mm_check_caps_format(caps);
return caps;
}
unsigned int stride_row = stride * byte_per_pixcel;
unsigned int i = 0, y = 0;
- data = (unsigned char *) malloc(src_size);
- gstcs_retvm_if(data == NULL, GSTCS_ERROR_OUT_OF_MEMORY, "data is NULL");
+ data = (unsigned char *) g_malloc0(src_size);
for (y = 0; y < height; y++) {
guint8 *pLine = (guint8 *) &(src[src_row * y]);
return GSTCS_ERROR_INVALID_OPERATION;
}
gstcs_debug("pGstreamer_s->output_buffer: %p\n", pGstreamer_s->output_buffer);
- *dst = calloc(1, buffer_size);
- if (*dst == NULL) {
- gstcs_error("ERROR - calloc ");
- gst_buffer_unref(pGstreamer_s->output_buffer);
- gst_object_unref(pGstreamer_s->pipeline);
- pGstreamer_s->output_buffer = NULL;
- return GSTCS_ERROR_INVALID_OPERATION;
- }
- memcpy(*dst, mapinfo.data, buffer_size);
+ *dst = g_memdup(mapinfo.data, buffer_size);
pImgp_info->buffer_size = buffer_size;
gst_buffer_unmap(pGstreamer_s->output_buffer, &mapinfo);
} else {