avf: fix faulty check in has_duration