From f04af4d6e012de6b0b8fb24446db9cba152585b6 Mon Sep 17 00:00:00 2001 From: bd Date: Mon, 16 Jun 2025 16:26:55 -0400 Subject: Remove `filter_duplicated_frame` --- aergia | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/aergia b/aergia index 54c86cb..af5a94e 100755 --- a/aergia +++ b/aergia @@ -220,27 +220,10 @@ class Aergia(object): def sort_samples(sample_dict): '''Returns SAMPLE_DICT in descending order by number of samples.''' return {k: v for k, v in sorted(sample_dict.items(), - key=lambda item: Aergia.sum_sample(item[1]), + key=lambda item: Aergia.sum_sample( + item[1]), reverse=True)} - @staticmethod - def filter_duplicated_frames(frames) -> bool: - s = set() - dup = [] - for f in frames: - if f in s: - dup.append(f) - else: - s.add(f) - # TODO we probably have one because given get_async_frames returns the - # currently executing task. Would be an easy fix in that method. - # if there's more than one, I cannot explain it. - assert len( - dup) < 2, f"ERROR: More than 1 duplicate frame (shouldn't happen): {dup}" - if len(dup) != 0: - print(f"WARN: Duplicate frame found: {dup}", file=sys.stderr) - return list(s) - @staticmethod def sum_sample(sample): return sample[0] + sample[1] -- cgit v1.2.3