refactoring

This commit is contained in:
Devaev Maxim
2021-01-06 15:50:19 +03:00
parent 2630147a96
commit a43d09ac73
6 changed files with 11 additions and 7 deletions

View File

@@ -74,3 +74,7 @@ bool frame_compare(const frame_s *a, const frame_s *b);
unsigned frame_get_padding(const frame_s *frame);
const char *fourcc_to_string(unsigned format, char *buf, size_t size);
inline bool is_jpeg(unsigned format) {
return (format == V4L2_PIX_FMT_JPEG || format == V4L2_PIX_FMT_MJPEG);
}

View File

@@ -34,6 +34,8 @@ static void _jpeg_error_handler(j_common_ptr jpeg);
int unjpeg(const frame_s *src, frame_s *dest, bool decode) {
assert(is_jpeg(src->format));
volatile int retval = 0;
struct jpeg_decompress_struct jpeg;