Skip to content
Snippets Groups Projects
Commit 455391ac authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Minor fix for net grab on create

parent d9fc99af
No related branches found
No related tags found
No related merge requests found
......@@ -158,11 +158,11 @@ void NetSource::_updateURI() {
_recvChunk(frame, chunk, delta, jpg, d);
});
N_ = 10;
N_ = 1;
// Initiate stream with request for first 10 frames
try {
host_->getNet()->send(peer_, "get_stream", *uri, 10, 0, host_->getNet()->id(), *uri);
host_->getNet()->send(peer_, "get_stream", *uri, N_, 0, host_->getNet()->id(), *uri);
} catch(...) {
LOG(ERROR) << "Could not connect to stream " << *uri;
}
......@@ -188,7 +188,7 @@ bool NetSource::grab() {
// Send one frame before end to prevent unwanted pause
if (N_ <= 2) {
N_ = 10;
if (!host_->getNet()->send(peer_, "get_stream", *host_->get<string>("uri"), 10, 0, host_->getNet()->id(), *host_->get<string>("uri"))) {
if (!host_->getNet()->send(peer_, "get_stream", *host_->get<string>("uri"), N_, 0, host_->getNet()->id(), *host_->get<string>("uri"))) {
active_ = false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment