[c-host] change getFrame/Pointer to return a real status

This commit is contained in:
Geoffrey McRae
2019-03-04 17:55:45 +11:00
parent 496fd79714
commit 88c2e55acf
3 changed files with 39 additions and 16 deletions

View File

@@ -86,12 +86,20 @@ static int frameThread(void * opaque)
while(app.running)
{
CaptureFrame frame;
CaptureResult result;
CaptureFrame frame;
frame.data = app.frame[frameIndex];
if (!app.iface->getFrame(&frame))
result = app.iface->getFrame(&frame);
if (result == CAPTURE_RESULT_REINIT)
{
app.reinit = true;
break;
}
if (result == CAPTURE_RESULT_ERROR)
{
DEBUG_ERROR("Failed to get the frame");
app.reinit = true;
break;
}