Update uvc camera sample

This commit is contained in:
John Zhao 2018-06-02 16:04:11 +08:00
parent 7451b6417d
commit 9d79526d6a

View File

@ -115,6 +115,10 @@ int main(int argc, char *argv[]) {
std::unique_lock<std::mutex> lock(mtx); std::unique_lock<std::mutex> lock(mtx);
if (frame == nullptr) { if (frame == nullptr) {
frame = std::make_shared<struct frame>(); frame = std::make_shared<struct frame>();
} else {
if (frame->continuation) {
frame->continuation();
}
} }
frame->data = data; // not copy here frame->data = data; // not copy here
frame->continuation = continuation; frame->continuation = continuation;