fix: add missing SetOffset(0) to TopKScoresCalculator that causes real-time graphs to freeze

This commit is contained in:
Luke 2022-12-28 09:16:40 +09:00
parent 175aff9be8
commit 0913107fe7

View File

@ -108,6 +108,8 @@ absl::Status TopKScoresCalculator::GetContract(CalculatorContract* cc) {
}
absl::Status TopKScoresCalculator::Open(CalculatorContext* cc) {
cc->SetOffset(mediapipe::TimestampDiff(0));
const auto& options = cc->Options<::mediapipe::TopKScoresCalculatorOptions>();
RET_CHECK(options.has_top_k() || options.has_threshold())
<< "Must specify at least one of the top_k and threshold fields in "