keep pixel format

This commit is contained in:
Devaev Maxim
2020-12-27 04:46:36 +03:00
parent 01d0ed97de
commit 1e8789f5e5
3 changed files with 4 additions and 1 deletions

View File

@@ -59,6 +59,7 @@ static frame_s *_init_internal(void) {
frame_set_data(blank, BLANK_JPEG_DATA, BLANK_JPEG_DATA_SIZE);
blank->width = BLANK_JPEG_WIDTH;
blank->height = BLANK_JPEG_HEIGHT;
blank->format = V4L2_PIX_FMT_JPEG;
return blank;
}
@@ -67,6 +68,7 @@ static frame_s *_init_external(const char *path) {
frame_s *blank;
blank = frame_init("blank_external");
blank->format = V4L2_PIX_FMT_JPEG;
if ((fp = fopen(path, "rb")) == NULL) {
LOG_PERROR("Can't open blank placeholder '%s'", path);

View File

@@ -27,6 +27,7 @@
#include <setjmp.h>
#include <jpeglib.h>
#include <linux/videodev2.h>
#include "../common/tools.h"
#include "../common/logging.h"

View File

@@ -242,7 +242,7 @@ int encoder_compress_buffer(encoder_s *encoder, unsigned worker_number, frame_s
frame->width = raw->width;
frame->height = raw->height;
// frame->format = V4L2_PIX_FMT_JPEG;
frame->format = V4L2_PIX_FMT_JPEG;
return 0;