mirror of
https://github.com/game-stop/veejay.git
synced 2025-12-16 04:40:11 +01:00
- fix possible crash when unable to open v4l device
This commit is contained in:
@@ -360,7 +360,6 @@ int v4lsetpalette(v4ldevice *vd, int palette)
|
||||
int v4lgetmbuf(v4ldevice *vd)
|
||||
{
|
||||
if(ioctl(vd->fd, VIDIOCGMBUF, &(vd->mbuf))<0) {
|
||||
veejay_msg(0, "v4lgetmbuf:VIDIOCGMBUF %s", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -603,8 +603,9 @@ static int __v4lvideo_init( v4lvideo_t *v, char *file, int channel, int norm, in
|
||||
|
||||
if ( v4lmaxchannel( &(v->vd) ) ) {
|
||||
if( v4lsetchannel( &(v->vd) , channel ) ) {
|
||||
v4lclose(&(v->vd));
|
||||
return -1;
|
||||
veejay_msg(VEEJAY_MSG_WARNING, "Unable to select channel %d", channel );
|
||||
// v4lclose(&(v->vd));
|
||||
// return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user