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