diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-02-23 10:43:42 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-02-23 10:43:42 +0100 |
commit | 645f62fee44496cf4a982c8b7ef24c7a6a4ccc2e (patch) | |
tree | f930b2594efe37a5451ae09deb3ea74423bfac5b /dvbapi.c | |
parent | ca31e8759115a5f123d69f2b93d51151a501229b (diff) | |
download | vdr-645f62fee44496cf4a982c8b7ef24c7a6a4ccc2e.tar.gz vdr-645f62fee44496cf4a982c8b7ef24c7a6a4ccc2e.tar.bz2 |
Fixed the SVDRP GRAB command in case the video device can't be opened
Diffstat (limited to 'dvbapi.c')
-rw-r--r-- | dvbapi.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -7,7 +7,7 @@ * DVD support initially written by Andreas Schultz <aschultz@warp10.net> * based on dvdplayer-0.5 by Matjaz Thaler <matjaz.thaler@guest.arnes.si> * - * $Id: dvbapi.c 1.148 2002/02/16 12:55:33 kls Exp $ + * $Id: dvbapi.c 1.149 2002/02/23 10:40:55 kls Exp $ */ //#define DVDDEBUG 1 @@ -2741,9 +2741,9 @@ const cSchedules *cDvbApi::Schedules(cThreadLock *ThreadLock) const bool cDvbApi::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, int SizeY) { - int result = 0; - int videoDev = OstOpen(DEV_VIDEO, CardIndex(), O_RDWR); + int videoDev = OstOpen(DEV_VIDEO, CardIndex(), O_RDWR, true); if (videoDev >= 0) { + int result = 0; struct video_mbuf mbuf; result |= ioctl(videoDev, VIDIOCGMBUF, &mbuf); if (result == 0) { @@ -2827,8 +2827,9 @@ bool cDvbApi::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX, result |= 1; } close(videoDev); + return result == 0; } - return result == 0; + return false; } #ifdef DEBUG_OSD |