diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-04-10 10:13:41 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-04-10 10:13:41 +0000 |
commit | b6225fc8ae3d70448d0deb15ad960f2dd4df2590 (patch) | |
tree | 2273b1ea256fb456e8b3ec644498d5527f74ec12 /stream/tvi_v4l2.c | |
parent | fe9c8d60b435679cc68022b936a9a036b10ea2dc (diff) | |
download | mpv-b6225fc8ae3d70448d0deb15ad960f2dd4df2590.tar.bz2 mpv-b6225fc8ae3d70448d0deb15ad960f2dd4df2590.tar.xz |
Make tvi_v4l2 print -1 as "Current input" if the ioctl to read it failed.
Previously it printed (number of inputs + 1) which is needlessly confusing.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29161 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tvi_v4l2.c')
-rw-r--r-- | stream/tvi_v4l2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index c890d7a51e..5bd654282e 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -1313,6 +1313,7 @@ static int init(priv_t *priv) } mp_msg(MSGT_TV, MSGL_INFO, " %d = %s;", i, input.name); } + i = -1; if (ioctl(priv->video_fd, VIDIOC_G_INPUT, &i) < 0) { mp_msg(MSGT_TV, MSGL_ERR, "%s: ioctl get input failed: %s\n", info.short_name, strerror(errno)); |