Fix Svace issue
[platform/core/multimedia/libmm-camcorder.git] / src / mm_camcorder_stillshot.c
index 0335310..a9b41ea 100644 (file)
@@ -1469,7 +1469,11 @@ static void __mmcamcorder_get_capture_data_from_buffer(MMCamcorderCaptureDataTyp
 
        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,