diff --git a/applications/merger/src/main.cpp b/applications/merger/src/main.cpp index 06d73202f231eca06902f7eb834e10c6aa28fa9b..d7b3f2b92d5976082f1995420cc6486061b714b2 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 aea0f1b209019332334a8530594d6ba1a84e4587..efeea93e6789c8b30fca1f1a67838e26e08546ac 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)) {