mirror of
https://github.com/pikvm/ustreamer.git
synced 2026-02-28 20:56:33 +00:00
keep pixel format
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <setjmp.h>
|
||||
|
||||
#include <jpeglib.h>
|
||||
#include <linux/videodev2.h>
|
||||
|
||||
#include "../common/tools.h"
|
||||
#include "../common/logging.h"
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user