changeset 29121:bae666342ba9

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.
author reimar
date Fri, 10 Apr 2009 10:13:41 +0000
parents aa06c29db609
children b8afbb8afe61
files stream/tvi_v4l2.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/stream/tvi_v4l2.c	Thu Apr 09 20:20:00 2009 +0000
+++ b/stream/tvi_v4l2.c	Fri Apr 10 10:13:41 2009 +0000
@@ -1313,6 +1313,7 @@
         }
         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));