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

Fix filestream mutex timeout issue

parent e28c335d
Branches
Tags
1 merge request!338Resolves #375 full colour resolution
...@@ -235,7 +235,7 @@ bool File::tick(int64_t ts) { ...@@ -235,7 +235,7 @@ bool File::tick(int64_t ts) {
// Check buffer first for frames already read // Check buffer first for frames already read
{ {
UNIQUE_LOCK(data_mutex_, dlk); //UNIQUE_LOCK(data_mutex_, dlk);
if (data_.size() > 0) has_data = true; if (data_.size() > 0) has_data = true;
if (needs_endframe_) { if (needs_endframe_) {
...@@ -245,7 +245,7 @@ bool File::tick(int64_t ts) { ...@@ -245,7 +245,7 @@ bool File::tick(int64_t ts) {
size_t frame_count = 0; size_t frame_count = 0;
for (auto i = data_.begin(); i != data_.end(); ++i) { for (auto i = data_.begin(); i != data_.end(); ) {
if (std::get<0>(*i).timestamp <= timestamp_) { if (std::get<0>(*i).timestamp <= timestamp_) {
auto &spkt = std::get<0>(*i); auto &spkt = std::get<0>(*i);
auto &pkt = std::get<1>(*i); auto &pkt = std::get<1>(*i);
...@@ -268,7 +268,10 @@ bool File::tick(int64_t ts) { ...@@ -268,7 +268,10 @@ bool File::tick(int64_t ts) {
} }
} }
ftl::pool.push([this,i](int id) { auto j = i;
++i;
ftl::pool.push([this,i=j](int id) {
auto &spkt = std::get<0>(*i); auto &spkt = std::get<0>(*i);
auto &pkt = std::get<1>(*i); auto &pkt = std::get<1>(*i);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment