1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 00:02:13 +00:00

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
This commit is contained in:
reimar 2009-04-10 10:13:41 +00:00
parent fe9c8d60b4
commit b6225fc8ae

View File

@ -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));