process_pipeline: Drop unnecessary malloc
This commit is contained in:
parent
9179b29f7c
commit
b29f04c05d
|
@ -435,11 +435,9 @@ process_image_for_capture(const uint8_t *image, int count)
|
||||||
TIFFCheckpointDirectory(tif);
|
TIFFCheckpointDirectory(tif);
|
||||||
printf("Writing frame to %s\n", fname);
|
printf("Writing frame to %s\n", fname);
|
||||||
|
|
||||||
unsigned char *pLine = (unsigned char *)malloc(mp_pixel_format_width_to_bytes(mode.pixel_format, mode.width));
|
|
||||||
for (int row = 0; row < mode.height; row++) {
|
for (int row = 0; row < mode.height; row++) {
|
||||||
TIFFWriteScanline(tif, (void *) image + (row * mp_pixel_format_width_to_bytes(mode.pixel_format, mode.width)), row, 0);
|
TIFFWriteScanline(tif, (void *) image + (row * mp_pixel_format_width_to_bytes(mode.pixel_format, mode.width)), row, 0);
|
||||||
}
|
}
|
||||||
free(pLine);
|
|
||||||
TIFFWriteDirectory(tif);
|
TIFFWriteDirectory(tif);
|
||||||
|
|
||||||
// Add an EXIF block to the tiff
|
// Add an EXIF block to the tiff
|
||||||
|
|
Loading…
Reference in New Issue