roi.width = width;
roi.height = height;
- assert_eq(MEDIA_VISION_ERROR_NONE,
- mv_source_fill_by_buffer(media_source, buffer,
- buffer_size, width, height,
- MEDIA_VISION_COLORSPACE_Y800));
+ int ret = mv_source_fill_by_buffer(media_source, buffer,
+ buffer_size, width, height,
+ MEDIA_VISION_COLORSPACE_Y800);
+
+ if (ret != MEDIA_VISION_ERROR_NONE)
+ {
+ free(buffer);
+ assert(FALSE);
+ }
printf("roi is out of area: the right-bottom corner is (%d,%d)\n",
roi.point.x + roi.width, roi.point.y + roi.height);