mirror of
https://github.com/mpv-player/mpv
synced 2025-01-30 19:52:14 +00:00
tv: attempt to support mjpeg streams
MPlayer handles this correctly, because MPlayer still has the FourCC codec dispatch (codecs.conf). We need to handle this case specially, because the libavformat rawvideo decoder will of course not eat mjpeg. mjpeg is the only supported format, though. (Even MPlayer needs to convert between V4L2 formats and MPlayer FourCCs, and mjpeg is the only non-raw format.)
This commit is contained in:
parent
ed3187b41a
commit
266ce242c3
@ -729,8 +729,12 @@ 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);
|
||||
sh_video->gsh->codec = "rawvideo";
|
||||
sh_video->format = fourcc;
|
||||
if (fourcc == MP_FOURCC_MJPEG) {
|
||||
sh_video->gsh->codec = "mjpeg";
|
||||
} else {
|
||||
sh_video->gsh->codec = "rawvideo";
|
||||
sh_video->format = fourcc;
|
||||
}
|
||||
|
||||
/* set FPS and FRAMETIME */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user