Skip to content

Commit 49ddf94

Browse files
committed
vcap/v4l2: fixed conversion of fmt unknown to UG
The V4L2 FourCC was an invalid codec_t element and lead to crash in get_codec_name() on that value few lines below.
1 parent 483d21d commit 49ddf94

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/video_capture/v4l2.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -693,8 +693,7 @@ static int vidcap_v4l2_init(struct vidcap_params *params, void **state)
693693
memcpy(fcc, &fmt.fmt.pix.pixelformat, 4);
694694
fcc[4] = '\0';
695695
log_msg(LOG_LEVEL_WARNING, MOD_NAME "No mapping for FCC '%s', converting to RGB!\n", fcc);
696-
opts.v4l2_convert_to = s->dst_fmt.fmt.pix.pixelformat =
697-
V4L2_PIX_FMT_RGB24;
696+
opts.v4l2_convert_to = RGB;
698697
}
699698
}
700699
if (opts.v4l2_convert_to != VC_NONE) {

0 commit comments

Comments
 (0)