From ce5691fa24dda9c6e299962e7f7bb669b1111c0e Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Wed, 4 Dec 2019 14:10:51 +0200 Subject: [PATCH] Corrections to merge bugs --- applications/merger/src/main.cpp | 4 +++- components/common/cpp/src/configuration.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/merger/src/main.cpp b/applications/merger/src/main.cpp index 06d73202f..d7b3f2b92 100644 --- a/applications/merger/src/main.cpp +++ b/applications/merger/src/main.cpp @@ -45,6 +45,8 @@ int main(int argc, char **argv) { return -1; } + LOG(INFO) << "Opening("<< i <<"): " << paths[i]; + rs[i] = new ftl::codecs::Reader(fs[i]); if (!rs[i]->begin()) { LOG(ERROR) << "Bad ftl file format"; @@ -73,7 +75,7 @@ int main(int argc, char **argv) { // FIXME: Need to truncate other stream if the following returns // no frames, meaning the timeshift causes this stream to run out // before the main stream. - rs[j]->read(spkt.timestamp+timeoff, [&out,&idmap,&lastid,j,r,stream_mask2,timeoff](const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) { + rs[j]->read(spkt.timestamp+timeoff+1, [&out,&idmap,&lastid,j,r,stream_mask2,timeoff](const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet &pkt) { if (((0x1 << spkt.streamID) & stream_mask2) == 0) return; if (int(spkt.channel) < 32 && spkt.timestamp < r->getStartTime()+timeoff) return; diff --git a/components/common/cpp/src/configuration.cpp b/components/common/cpp/src/configuration.cpp index aea0f1b20..efeea93e6 100644 --- a/components/common/cpp/src/configuration.cpp +++ b/components/common/cpp/src/configuration.cpp @@ -584,6 +584,7 @@ Configurable *ftl::config::configure(int argc, char **argv, const std::string &r vector<string> paths; while (argc-- > 0) { paths.push_back(argv[0]); + argv++; } if (!findConfiguration(options["config"], paths)) { -- GitLab