libtriple: fix filedescriptor leak in cVideo::routeVideo()

Origin commit data
------------------
Branch: ni/coolstream
Commit: e786a4ef75
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2011-01-02 (Sun, 02 Jan 2011)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2011-01-02 16:07:00 +01:00
parent 829d6a0daa
commit 2072babc6f

View File

@@ -654,16 +654,16 @@ void cVideo::routeVideo(int standby)
perror("IOC_AVS_SCART_PIN8_FOLLOW_VCR");
if (ioctl(avsfd, IOC_AVS_ROUTE_VCR2TV) < 0)
perror("IOC_AVS_ROUTE_VCR2TV");
return;
} else {
unsigned char fblk = 1;
printf("[%s] setting fastblank to %d, pin8 to %dV, routing encoder to TV\n", __FUNCTION__, fblk, scartvoltage);
if (ioctl(avsfd, IOC_AVS_FASTBLANK_SET, fblk) < 0)
perror("IOC_AVS_FASTBLANK_SET, fblk");
if (ioctl(avsfd, IOC_AVS_SCART_PIN8_SET, scartvoltage) < 0)
perror("IOC_AVS_SCART_PIN8_SET");
if (ioctl(avsfd, IOC_AVS_ROUTE_ENC2TV) < 0)
perror("IOC_AVS_ROUTE_ENC2TV");
}
unsigned char fblk = 1;
printf("[%s] setting fastblank to %d, pin8 to %dV, routing encoder to TV\n", __FUNCTION__, fblk, scartvoltage);
if (ioctl(avsfd, IOC_AVS_FASTBLANK_SET, fblk) < 0)
perror("IOC_AVS_FASTBLANK_SET, fblk");
if (ioctl(avsfd, IOC_AVS_SCART_PIN8_SET, scartvoltage) < 0)
perror("IOC_AVS_SCART_PIN8_SET");
if (ioctl(avsfd, IOC_AVS_ROUTE_ENC2TV) < 0)
perror("IOC_AVS_ROUTE_ENC2TV");
close(avsfd);
}