refactoring

This commit is contained in:
Devaev Maxim
2019-03-05 14:23:11 +03:00
parent 502aa3a0cb
commit f439f37526
8 changed files with 14 additions and 14 deletions

View File

@@ -43,11 +43,11 @@ struct _jpeg_dest_manager_t {
struct jpeg_destination_mgr mgr; // Default manager
JOCTET *buffer; // Start of buffer
unsigned char *outbuffer_cursor;
unsigned long *written;
size_t *written;
};
static void _jpeg_set_dest_picture(j_compress_ptr jpeg, unsigned char *picture, unsigned long *written);
static void _jpeg_set_dest_picture(j_compress_ptr jpeg, unsigned char *picture, size_t *written);
static void _jpeg_write_scanlines_yuyv(
struct jpeg_compress_struct *jpeg, const unsigned char *data,
@@ -114,7 +114,7 @@ void cpu_encoder_compress_buffer(struct device_t *dev, unsigned index, unsigned
assert(dev->run->pictures[index].size <= dev->run->max_picture_size);
}
static void _jpeg_set_dest_picture(j_compress_ptr jpeg, unsigned char *picture, unsigned long *written) {
static void _jpeg_set_dest_picture(j_compress_ptr jpeg, unsigned char *picture, size_t *written) {
struct _jpeg_dest_manager_t *dest;
if (jpeg->dest == NULL) {

View File

@@ -173,8 +173,8 @@ int omx_encoder_prepare_live(struct omx_encoder_t *omx, struct device_t *dev, un
int omx_encoder_compress_buffer(struct omx_encoder_t *omx, struct device_t *dev, unsigned index) {
OMX_ERRORTYPE error;
unsigned slice_size = omx->input_buffer->nAllocLen;
unsigned pos = 0;
size_t slice_size = omx->input_buffer->nAllocLen;
size_t pos = 0;
if ((error = OMX_FillThisBuffer(omx->encoder, omx->output_buffer)) != OMX_ErrorNone) {
LOG_OMX_ERROR(error, "Failed to request filling of the output buffer on encoder");