From f0223e1b835894a20989523555a0f4e19cd36619 Mon Sep 17 00:00:00 2001 From: Philip Langdale Date: Sat, 3 Mar 2018 11:57:41 -0800 Subject: tv: Recognise v4l2 'JPEG' fourcc Naturally, there's more than one fourcc that indicates an mjpeg stream. I have a particular ancient webcam here (Logitech QuickCam Messanger) that only supports the single 'JPEG' format, but there are other devices out there which support both 'JPEG' and 'MJPG' with no visible differences, and others where the streams are slightly different. Regardless of those details, it remains correct to treat 'JPEG' the same as 'MJPG' from a stream consumption perspective. --- demux/demux_tv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demux') diff --git a/demux/demux_tv.c b/demux/demux_tv.c index e9ed2b48e7..0e9bee4317 100644 --- a/demux/demux_tv.c +++ b/demux/demux_tv.c @@ -85,7 +85,7 @@ static int demux_open_tv(demuxer_t *demuxer, enum demux_check check) /* get IMAGE FORMAT */ int fourcc; funcs->control(tvh->priv, TVI_CONTROL_VID_GET_FORMAT, &fourcc); - if (fourcc == MP_FOURCC_MJPEG) { + if (fourcc == MP_FOURCC_MJPEG || fourcc == MP_FOURCC_JPEG) { sh_v->codec->codec = "mjpeg"; } else { sh_v->codec->codec = "rawvideo"; -- cgit v1.2.3