summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-09-15 13:14:42 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-09-15 13:14:42 +0200
commit441258c7ea2acffd6cd0f4335cdb9e88c1e99508 (patch)
tree94e7f26ce0034755e27c9a96fa1ff4714a4e79da /dvbdevice.c
parente165c9ad8be82626c128f20db49797854d5e504e (diff)
downloadvdr-441258c7ea2acffd6cd0f4335cdb9e88c1e99508.tar.gz
vdr-441258c7ea2acffd6cd0f4335cdb9e88c1e99508.tar.bz2
Fixed opening /dev/video in cDvbDevice::GrabImage() in case of NEWSTRUCT driver
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index debcce0b..0ba7c25d 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.18 2002/09/15 11:24:18 kls Exp $
+ * $Id: dvbdevice.c 1.19 2002/09/15 13:12:25 kls Exp $
*/
#include "dvbdevice.h"
@@ -200,7 +200,11 @@ cSpuDecoder *cDvbDevice::GetSpuDecoder(void)
bool cDvbDevice::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY)
{
- int videoDev = DvbOpen(DEV_VIDEO, CardIndex(), O_RDWR, true);
+ char buffer[PATH_MAX];
+ snprintf(buffer, sizeof(buffer), "%s%d", DEV_VIDEO, CardIndex());
+ int videoDev = open(buffer, O_RDWR);
+ if (videoDev < 0)
+ LOG_ERROR_STR(buffer);
if (videoDev >= 0) {
int result = 0;
struct video_mbuf mbuf;