From b6225fc8ae3d70448d0deb15ad960f2dd4df2590 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 10 Apr 2009 10:13:41 +0000 Subject: 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 --- stream/tvi_v4l2.c | 1 + 1 file changed, 1 insertion(+) (limited to 'stream/tvi_v4l2.c') 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)); -- cgit v1.2.3