def get_nb_samples(decoder, packet, length): result = _get_nb_samples(decoder, packet, length) if result < 0: raise OpusError(result) return result