mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Amlogic grabber: fixup closing video device on each frame
This commit is contained in:
parent
91054d8d70
commit
46cad16305
@ -117,7 +117,11 @@ int AmlogicGrabber::grabFrame(Image<ColorRgb> & image)
|
|||||||
}
|
}
|
||||||
else if (_device == "amvideocap0")
|
else if (_device == "amvideocap0")
|
||||||
{
|
{
|
||||||
grabFrame_amvideocap(image);
|
if (grabFrame_amvideocap(image) < 0)
|
||||||
|
{
|
||||||
|
closeDev(_videoDev);
|
||||||
|
closeDev(_captureDev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -131,8 +135,6 @@ int AmlogicGrabber::grabFrame(Image<ColorRgb> & image)
|
|||||||
_fbGrabber.grabFrame(image);
|
_fbGrabber.grabFrame(image);
|
||||||
}
|
}
|
||||||
|
|
||||||
closeDev(_videoDev);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,6 +178,7 @@ int AmlogicGrabber::grabFrame_amvideocap(Image<ColorRgb> & image)
|
|||||||
// Read of snapshot failed
|
// Read of snapshot failed
|
||||||
ErrorIf(_lastError != 4, _log,"Capture failed to grab entire image [bytesToRead(%d) != bytesRead(%d)]", _bytesToRead, bytesRead);
|
ErrorIf(_lastError != 4, _log,"Capture failed to grab entire image [bytesToRead(%d) != bytesRead(%d)]", _bytesToRead, bytesRead);
|
||||||
closeDev(_captureDev);
|
closeDev(_captureDev);
|
||||||
|
_lastError = 4;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user