- fix possible crash when unable to open v4l device

This commit is contained in:
test
2010-12-05 19:53:59 +01:00
parent c7b5c96a73
commit e1a469e20e
2 changed files with 3 additions and 3 deletions

View File

@@ -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;

View File

@@ -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;
}
}