mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed the SVDRP GRAB command in case the video device can't be opened
This commit is contained in:
parent
ca31e87591
commit
645f62fee4
@ -212,3 +212,6 @@ Rainer Zocholl <Usenet-372114@zocki.toppoint.de>
|
||||
|
||||
Oleg Assovski <assen@bitcom.msk.ru>
|
||||
for adding EPG scanning for another 4 days
|
||||
|
||||
Adrian Stabiszewski <as@nitegate.de>
|
||||
for fixing the SVDRP GRAB command in case the video device can't be opened
|
||||
|
2
HISTORY
2
HISTORY
@ -1018,3 +1018,5 @@ Video Disk Recorder Revision History
|
||||
from the start time of the recording. In order for this to work the 'active'
|
||||
parameter of a timer now uses the second bit to indicate that this is an
|
||||
"instant" recording (see FORMATS for details).
|
||||
- Fixed the SVDRP GRAB command in case the video device can't be opened (thanks
|
||||
to Adrian Stabiszewski).
|
||||
|
9
dvbapi.c
9
dvbapi.c
@ -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,9 +2827,10 @@ bool cDvbApi::GrabImage(const char *FileName, bool Jpeg, int Quality, int SizeX,
|
||||
result |= 1;
|
||||
}
|
||||
close(videoDev);
|
||||
}
|
||||
return result == 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_OSD
|
||||
void cDvbApi::SetColor(eDvbColor colorFg, eDvbColor colorBg)
|
||||
|
Loading…
Reference in New Issue
Block a user