removed frame name

This commit is contained in:
Devaev Maxim
2021-03-30 10:02:03 +03:00
parent c1d7bd1595
commit 3c7075d0d2
11 changed files with 15 additions and 25 deletions

View File

@@ -23,10 +23,9 @@
#include "frame.h"
frame_s *frame_init(const char *name) {
frame_s *frame_init(void) {
frame_s *frame;
A_CALLOC(frame, 1);
frame->name = name;
frame->managed = true;
frame_realloc_data(frame, 512 * 1024);
return frame;
@@ -43,8 +42,6 @@ void frame_destroy(frame_s *frame) {
void frame_realloc_data(frame_s *frame, size_t size) {
assert(frame->managed);
if (frame->allocated < size) {
//LOG_DEBUG("Increasing frame buffer '%s': %zu -> %zu (+%zu)",
// frame->name, frame->allocated, size, size - frame->allocated);
A_REALLOC(frame->data, size);
frame->allocated = size;
}

View File

@@ -32,12 +32,9 @@
#include <linux/videodev2.h>
#include "tools.h"
//#include "logging.h"
typedef struct {
const char *name;
uint8_t *data;
size_t used;
size_t allocated;
@@ -88,7 +85,7 @@ inline void frame_copy_meta(const frame_s *src, frame_s *dest) {
)
frame_s *frame_init(const char *name);
frame_s *frame_init(void);
void frame_destroy(frame_s *frame);
void frame_realloc_data(frame_s *frame, size_t size);

View File

@@ -87,6 +87,6 @@ static void _jpeg_error_handler(j_common_ptr jpeg) {
char msg[JMSG_LENGTH_MAX];
(*jpeg_error->mgr.format_message)(jpeg, msg);
LOG_ERROR("Can't decompress %s JPEG: %s", jpeg_error->frame->name, msg);
LOG_ERROR("Can't decompress JPEG: %s", msg);
longjmp(jpeg_error->jmp, -1);
}