linux-v4l2: Add support for grayscale MJPEG

This commit is contained in:
Staacks 2023-07-09 23:32:04 +02:00 committed by Lain
parent e121ac1587
commit 79d77ddf90

View file

@ -104,6 +104,9 @@ int v4l2_decode_frame(struct obs_source_frame *out, uint8_t *data,
}
switch (decoder->context->pix_fmt) {
case AV_PIX_FMT_GRAY8:
out->format = VIDEO_FORMAT_Y800;
break;
case AV_PIX_FMT_YUVJ422P:
case AV_PIX_FMT_YUV422P:
out->format = VIDEO_FORMAT_I422;