ExceptionInfo* exception = NULL;
Image* input_image = NULL;
ImageInfo* image_info = NULL;
- char* streamname = NULL;
- int str_length = 0;
exception = AcquireExceptionInfo();
image_info = CloneImageInfo(NULL);
- str_length = 10 + strlen(format);
- streamname = malloc(sizeof(char) * str_length);
- snprintf(streamname, str_length, "streamin.%s", format);
- memcpy(image_info->filename, streamname, str_length);
+ sprintf(image_info->filename, "streamin.%s", format);
debug_printf(DEBUG, image_info->filename);
input_image = BlobToImage(image_info, in->data, in->size , exception);
if (input_image == NULL) {
DestroyImageInfo(image_info);
DestroyExceptionInfo(exception);
- free(streamname);
- streamname = NULL;
return;
}
DestroyImageInfo(image_info);
DestroyImage(input_image);
DestroyExceptionInfo(exception);
- free(streamname);
- streamname = NULL;
}
void kds_s2000w_convert_jpg_to_pnm_with_depth(blobdata* in, blobdata* out, int depth)