diff options
author | wm4 <wm4@nowhere> | 2013-09-04 00:46:23 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-09-04 00:46:23 +0200 |
commit | 266ce242c34ac0836934317b7cccb8f7b82b4108 (patch) | |
tree | d1c942bc0affa08e3d5ac8555b7424ad500667db | |
parent | ed3187b41a24b2f6765c1a98fc7683f8f1cfe870 (diff) | |
download | mpv-266ce242c34ac0836934317b7cccb8f7b82b4108.tar.bz2 mpv-266ce242c34ac0836934317b7cccb8f7b82b4108.tar.xz |
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.)
-rw-r--r-- | stream/tv.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/stream/tv.c b/stream/tv.c index 3a2064d247..3b1a8a2cfc 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -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 */ |