mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-07-26 05:32:06 +00:00
size -> used
This commit is contained in:
@@ -81,8 +81,8 @@ void cpu_encoder_compress_buffer(struct device_t *dev, unsigned index, unsigned
|
||||
|
||||
# define PICTURE(_next) dev->run->pictures[index]._next
|
||||
|
||||
PICTURE(size) = 0;
|
||||
_jpeg_set_dest_picture(&jpeg, PICTURE(data), &PICTURE(size));
|
||||
PICTURE(used) = 0;
|
||||
_jpeg_set_dest_picture(&jpeg, PICTURE(data), &PICTURE(used));
|
||||
|
||||
jpeg.image_width = dev->run->width;
|
||||
jpeg.image_height = dev->run->height;
|
||||
@@ -112,8 +112,8 @@ void cpu_encoder_compress_buffer(struct device_t *dev, unsigned index, unsigned
|
||||
// https://stackoverflow.com/questions/19857766/error-handling-in-libjpeg
|
||||
jpeg_finish_compress(&jpeg);
|
||||
jpeg_destroy_compress(&jpeg);
|
||||
assert(PICTURE(size) > 0);
|
||||
assert(PICTURE(size) <= dev->run->max_picture_size);
|
||||
assert(PICTURE(used) > 0);
|
||||
assert(PICTURE(used) <= dev->run->max_picture_size);
|
||||
}
|
||||
|
||||
static void _jpeg_set_dest_picture(j_compress_ptr jpeg, unsigned char *picture, size_t *written) {
|
||||
|
||||
Reference in New Issue
Block a user