Without this patch, the initial value on my system is for example 3, so that two much items are counted. In the second step the function breaks with a error code, when the information downloading of the non-existing item fails.
Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: Antoine Cellerier <dionoea@videolan.org>
{
struct v4l2_standard t_standards;
t_standards.index = 0;
+ p_sys->i_standard = 0;
while( v4l2_ioctl( i_fd, VIDIOC_ENUMSTD, &t_standards ) >=0 )
{
p_sys->i_standard++;
{
struct v4l2_tuner tuner;
memset( &tuner, 0, sizeof(tuner) );
+ p_sys->i_tuner = 0;
while( v4l2_ioctl( i_fd, VIDIOC_G_TUNER, &tuner ) >= 0 )
{
p_sys->i_tuner++;