memset(&mapinfo, 0x0, sizeof(GstMapInfo));
- gst_buffer_map(gst_sample_get_buffer(sample), &mapinfo, GST_MAP_READ);
+ if (!gst_buffer_map(gst_sample_get_buffer(sample), &mapinfo, GST_MAP_READ)) {
+ MMCAM_LOG_ERROR("map failed : buffer[%p]", gst_sample_get_buffer(sample));
+ goto GET_FAILED;
+ }
+
capture_data->data = mapinfo.data;
capture_data->format = pixtype;
gst_structure_get(structure,